Transformations during validation and test

I am try to identify transformation (batch_tfms and item_tfms) happing during test and validation in dataloader. I am not able figure out how shall i proceed.

learn=ImageDataLoaders.from_df(df.loc[:,['frname','label','is_valid']],
                 batch_tfms=[*aug_transforms(pad_mode='zeros', size=224),
                  Normalize.from_stats(*imagenet_stats)],
                 path=imagepath, valid_col='is_valid',label_col='label',
                seed=42, item_tfms=Resize(408,pad_mode='zeros'))

I getting predictions from:

learn.get_preds(dl=dl)

I invite you to explore the documentation and then look at the transforms themselves: https://docs.fast.ai/vision.augment

Anything inside aug_transforms that’s not a resize isn’t applied to the validation, and any Resize like transform do a center crop on the validation set

1 Like

So it means that if we have presize enabled via item_tfms and then resize via batch_tfms, this will work same way for validation and test dataset as well ?

how to override the center crop behaviour of Val set. ?

How to ensure val set follows our own defined resize or crop method?