mit-han-lab / data-efficient-gans

[NeurIPS 2020] Differentiable Augmentation for Data-Efficient GAN Training
https://arxiv.org/abs/2006.10738
BSD 2-Clause "Simplified" License
1.27k stars 175 forks source link

Questions about differentiable augmentation #74

Closed RayGuo-C closed 3 years ago

RayGuo-C commented 3 years ago

Dear,

Thank you for your great work. I am planning to use your method to my small dataset with DCGAN. But there are two questions about the differentiable augmentation.

  1. In your paper, you mentioned that “DiffAugment” T requires to be differentiable since gradients should be back-propagated through T to generator. But you did not give a mathematical expression to prove that T is differentiable. So do you mean that any augmentations on images are differentiable and we do not need to prove this?

  2. In your code 'DiffAugment_pytorch.py', you use two transpose, before and after augmentation respectively, but I don't the reason. So could you please explain it and can we directly use augmentations without transpose.

  3. The augmentations you use do not include flipping and rotating. Could you please tell me what's wrong with them?

Best regards Rui Guo

zsyzzsoft commented 3 years ago
  1. Almost any augmentation can be made differentiable with proper implementation.
  2. It's used to convert between channel-first (NCHW) and channel-last (NHWC) format. So please confirm the format you are using and select the right version.
  3. We directly apply flipping to augment only the real images since it rarely changes the target distribution. Rotation can be helpful but not always (maybe too strong), so we want to keep the simplicity.
RayGuo-C commented 3 years ago

Thank you very much for your explanation. It's clear now.