Data augmentation creates additional training examples by applying randomized, label-preserving transformations to existing images. It increases input diversity when collecting more data is costly. section 3.6
Choose transformations that preserve the data’s meaning:
- Use rotations, translations, shears, crops, perspective changes, or color adjustments when their labels remain valid. section 3.6
- Randomize transform parameters; control optional transforms with probabilities such as p=0.5 or p=0.15. section 3.6
- Inspect transformed samples before training: flipping MNIST digits can change a 9 into a 6. section 3.6
Training and testing pipelines
A PyTorch pipeline applies RandomAffine during training, then converts images with ToTensor; testing uses only ToTensor. A CNN comparison evaluates accuracy with and without augmentation.








