.transform vs get_transforms

Currently working on lesson 3-planet and I understand how we first created the tfms variable in which we set certain parameters of how we want to transform the images when creating the databunch, however, after that when setting the data variable we use the .transform method on src and pass tfms in it and size=128


My question is, why aren’t we defining the size in the get_transforms step? Since that step where we are creating the tfms variable, is about all the different ways we want to transform the images before creating a databunch (flipping vertically, max lighting, max zoom etc.)

Thanks so much in advance!

You’re confusing transformation with augmentation. size=128 refers to all images in the databunch having the same size, i.e. 128x128. All images in the databunch should be of same size. get_tranforms is a data augmentation technique for images and what it does is change the brightness, contrast, zoom(0.5x, 2x ,…) etc on the same image. The image size remains the same in all instances. We do change the image sizes but that’s called progressive resizing.

I see, thanks for your help!