Mixup
Mixup is a data augmentation technique that generates new training samples by linearly interpolating pairs of images. We follow the implementation of mixup in SRe2L.
CLASS dd_ranking.aug.Mixup(params: dict) [SOURCE]
Parameters
- params(dict): Parameters for the mixup augmentation. We require the parameters to be in the format of
{'param_name': param_value}
. For mixup, onlylambda
(mixup strength) needs to be specified, e.g.{'lambda': 0.8}
.
Example
# When intializing an evaluator with mixup augmentation, and mixup object will be constructed.
>>> self.aug_func = Mixup(params={'lambda': 0.8})
# During training, the mixup object will be used to augment the data.
>>> images = aug_func(images)