Exercise

Using data augmentation

Data augmentation is a technique to artificially increase the size of the training dataset. Here you will experiment with different levels of data augmentation:

RandomHorizontalFlip, where p is the probability of flipping the image.

RandomResizedCrop, where size is the size of the output crop, and scale is the upper and lower bounds of the dimensions of the crop before resizing.

RandomRotation, where degrees is the range of degrees to randomly select from.

A \(C \times H \times W\) image tensor has already been created. The transforms module is already imported as well as the torch.nn as nn.

Instructions 1/2

undefined XP
  • 1
    • Create a data augmentation strategy using at least one of the transforms mentioned.
  • 2
    • Create a data augmentation strategy using all three transforms while keeping the output image dimension to 32 x 32.