Recall & Review
beginner
What is data augmentation in machine learning?
Data augmentation is a technique to increase the diversity of training data by applying random transformations like rotation, flipping, or scaling. This helps models learn better and avoid overfitting.
Click to reveal answer
beginner
Name three common image transformations used in PyTorch for data augmentation.
Common transformations include RandomHorizontalFlip (flips image horizontally), RandomRotation (rotates image by a random angle), and ColorJitter (changes brightness, contrast, saturation).
Click to reveal answer
intermediate
How does RandomHorizontalFlip help improve model performance?
RandomHorizontalFlip flips images horizontally at random during training. This teaches the model to recognize objects regardless of left-right orientation, improving generalization.
Click to reveal answer
intermediate
Explain the role of Compose in PyTorch transforms.
Compose lets you chain multiple transformations together. For example, you can rotate, flip, and normalize images in one step by passing a list of transforms to Compose.
Click to reveal answer
intermediate
What is the difference between transforms applied during training and testing?
During training, random transforms are applied to augment data and improve robustness. During testing, deterministic transforms like resizing and normalization are used to keep evaluation consistent.
Click to reveal answer
Which PyTorch transform randomly flips an image horizontally?
✗ Incorrect
RandomHorizontalFlip flips images horizontally at random during training.
What does the Compose transform do in PyTorch?
✗ Incorrect
Compose chains multiple transforms so they apply sequentially.
Why do we apply data augmentation only during training?
✗ Incorrect
Augmentation shows varied data to the model, helping it generalize better.
Which transform would you use to randomly change image brightness?
✗ Incorrect
ColorJitter can randomly change brightness, contrast, and saturation.
What is a common transform applied during both training and testing?
✗ Incorrect
Normalization is applied during testing to keep input consistent.
Describe how you would set up data augmentation for training an image classifier using PyTorch transforms.
Think about the sequence of transformations to increase data variety.
You got /4 concepts.
Explain why data augmentation helps prevent overfitting in machine learning models.
Consider how seeing different versions of data affects learning.
You got /4 concepts.