1
$\begingroup$

While going over PyTorch image augmentations, https://pytorch.org/vision/stable/transforms.html, I see that some augmentations can be applied with a certain probability. What is the purpose of applying stochastic augmentations rather than consistently applying a certain augmentation?

$\endgroup$
1
$\begingroup$

Stochastic augmentations are used to sample from all possible augmentations, when the dataset size of all possible augmentations would be too large.

This is usually done on-demand, and as a result each training epoch should result in slighty different inputs. This approach can be beneficial in preventing overfitting when the variability in possible inputs is far larger than you could ever properly sample from (e.g. natural images).

$\endgroup$
2
  • $\begingroup$ Thank you for the answer. I am curious, aren't augmentations anyways used to tackle overfitting. It is quite surprising for me when I see that after augmenting my RL input, it seems to lose its generalization capabilities. Would stochastic augmentations be able to mitigate that? $\endgroup$ Aug 29 at 15:47
  • 1
    $\begingroup$ @desert_ranger Yes, augmentations are a general way of trying to tackle overfitting. Parametric augmentations with on-demand random variations take the idea a bit further. Usually RL does not have the same problem, because it has a built-in generation method (constantly making new observations). That may depend on what you are using RL for, and there are related issues in RL, such as catastrophic forgetting $\endgroup$ Aug 29 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.