ildoonet/pytorch-randaugment

The order of augmentation

moskomule opened this issue · 0 comments

Hi, thank you for the awesome repo.

I have a question about the order of augmentation.

In the original code, https://github.com/tensorflow/tpu/blob/c61a451165ba643ac9e0ae94448821ca71745ebf/models/official/efficientnet/preprocessing.py#L171 the preprocessing (e.g., random crop) is applied first, and then RandAug policy is applied.

Contrarily, in your code,

transform_train.transforms.insert(0, RandAugment(C.get()['randaug']['N'], C.get()['randaug']['M']))
, you first apply RandAug policy and then use the preprocessing.

Are there any ideas behind this modification?
Thanks in advance.