Free data, generated on the fly
Augmentation is the cheapest way to make a small dataset bigger: instead of collecting more photos, you show the model a slightly different version of each photo every epoch — flipped, rotated, zoomed, recolored. The model never sees the exact same input twice, so it can't just memorize the training set. It's forced to learn the invariances you actually care about (a cat is still a cat upside-down-ish, lighter, or off-center).
On during training, off at inference
The key behavior to internalize: Random* layers only fire when training=True. During fit() they inject randomness; during predict() and evaluate() they pass the input straight through untouched. That's exactly what you want — you augment to make learning harder, not to scramble the images you're scoring. Because they're plain layers, you can stack them in their own Sequential block and drop that block into any model.
Tune the strength to your data
There's no universal setting. Start mild (rotation 0.05, zoom 0.05), watch validation accuracy climb, then push harder. The failure mode is over-augmentation: if the transforms are so aggressive that even your training accuracy stalls, you've made the task harder than the model can learn — back off. Match the augmentation to reality too: RandomFlip("horizontal") is great for cats, wrong for handwritten digits (a flipped 2 isn't a 2).