Training a model with augmented data
In the previous recipe, you learned about some additional facilities that fastai provides to keep track of your model and you learned how to apply the test set to the model trained on the training set. In this recipe, you will learn how to combine these techniques with another technique that fastai makes it easy to incorporate in your model training: data augmentation. With data augmentation, you can expand your training dataset to include variations on the original training samples and, potentially, improve the performance of the trained model.
Figure 8.14 shows some results of augmentation applied to an image from the CIFAR
dataset:
You can see in these examples that the augmentations applied to the image include flipping the image on the vertical axis, rotating the image, and adjusting the brightness of the image.
As in the previous recipe, in this recipe,...