mixmo.loaders.dataset_wrapper.MixMoDataset¶
-
class
mixmo.loaders.dataset_wrapper.
MixMoDataset
(dataset, num_classes, num_members, dict_config, properties)[source]¶ Bases:
mixmo.loaders.dataset_wrapper.MSDADataset
Dataset wrapper that returns dictionaries of multiple samples, and applies MSDA augmentations
-
__init__
(dataset, num_classes, num_members, dict_config, properties)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(dataset, num_classes, num_members, …)Initialize self.
call_dataset
(index[, seed])Get target and image, apply AugMix if necessary and return dictionary
call_msda
(index_0[, mixmo_mask, seed_da])Get two samples and mix them.
get_mixmo_mix_method_at_ratio_epoch
([batch_seed])Select which mixing method should be used according to training scheduling.
set_ratio_epoch
(ratioepoch)Attributes
reverse_if_first_minor
-
_init_dict_output_mixmo
(batch_seed)[source]¶ Compute MixMo block variables (masks, lams) and prepare it as a dictionary output
-
get_mixmo_mix_method_at_ratio_epoch
(batch_seed=None)[source]¶ Select which mixing method should be used according to training scheduling.
Procedure: Select self.dict_mixmo_mix_method[“method_name”] with proba self.dict_mixmo_mix_method[“prob”] that is linearly decreased towards 0 after 11/12 of training process. Otherwise, use self.dict_mixmo_mix_method[“replacement_method_name”] (in general mixup)
-