What's the difference between batch and item transforms?

What’s the difference between batch and item transforms? I’ve seen some other forum posts but none of their answers are satisfactory. Could someone explain it in as simple words as possible?

Item Transforms are being applied to every item individually on the CPU (like resizing an image to a certain size or normalizing it).

Batch Transforms are being applied to a batch as a whole on the GPU. Its especially useful for data augmentation since it lets you apply a (random) transform to a batch everytime it is created. That means that you can rotate an image randomly, always a little bit different from epoch to epoch.

Hope the explanations are clear.

1 Like