How do transformations work?

When using transforms does the code consistently transform a specific image with a specific set of transforms? Does it change what transforms it uses on a specific image in different epochs? Does it copy an image, transform it and then use both the original image and the transformed one in a single epoch?

It would be great if someone could provide some instructions or guide on how to find this in the source code and/or docs? Please, Don’t just point me to the spot in the docs but preferably take me through the process on how you got there so I can do this myself in the future.

There are two cases. There are some kinds of transforms, like center cropping (and sometimes resizing), that you want applied every time to images. But there are also random transforms (could be shift, scale, zoom, blur, brightness) that you use for data augmentation. With the random transforms, a given image might appear differently in each epoch. In epoch 1 it might be rotated 20 degrees, in epoch 2 rotated 10 degrees, etc., depending on how you configured your transforms.