Item_tfms vs batch_tfms

Late reply but looks like that’s correct! According to the solution to Q.17 of Lesson 2 (Deployment) of the 2022 course release:

item_tfms are transformations applied to a single data sample x on the CPU. Resize() is a common transform because the mini-batch of input images to a cnn must have the same dimensions. Assuming the images are RGB with 3 channels, then Resize () as item_tfms will make sure the images have the same width and height.
batch_tfms are applied to batched data samples (aka individual samples that have been collated into a mini-batch) on the GPU. They are faster and more efficient than item_tfms . A good example of these are the ones provided by aug_transforms() . Inside are several batch-level augmentations that help many models.

2 Likes