You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""This package includes all the modules related to data loading and preprocessing
19
+
20
+
To add a custom dataset class called 'dummy', you need to add a file called 'dummy_dataset.py' and define a subclass 'DummyDataset' inherited from BaseDataset.
21
+
You need to implement four functions:
22
+
-- <__init__>: initialize the class, first call BaseDataset.__init__(self, opt).
23
+
-- <__len__>: return the size of dataset.
24
+
-- <__getitem__>: get a data point from data loader.
25
+
-- <modify_commandline_options>: (optionally) add dataset-specific options and set default options.
26
+
27
+
Now you can use the dataset class by specifying flag '--dataset_mode dummy'.
28
+
See our template dataset class 'template_dataset.py' for more details.
raiseNotImplementedError("In %s.py, there should be a subclass of BaseDataset with class name that matches %s in lowercase."% (dataset_filename, target_dataset_name))
60
+
61
+
returndataset
62
+
63
+
64
+
defget_option_setter(dataset_name):
65
+
"""Return the static method <modify_commandline_options> of the dataset class."""
0 commit comments