Loading…
Glossary term
Creating modified versions of existing data to give a model more varied training examples.
Data augmentation creates modified copies of existing examples: flipping or cropping an image, adding noise to audio, or rewording a sentence. The label stays the same.
It exposes the model to more variety and so helps it generalize.
Simple image augmentation
from torchvision import transforms
augment = transforms.Compose([
transforms.RandomHorizontalFlip(),
transforms.RandomRotation(10),
transforms.ColorJitter(brightness=0.2),
])It is a cheap way to stretch limited data and reduce overfitting.