abhinavankur:

This is the shape of one batch from the dataloader: torch.Size([32, 3, 224, 224])
This is the shape of the image after preprocessing it: torch.Size([3, 224, 224])


Could you post the preprocessing code, please?
Somehow the batch dimension was reduced to a single example, which should be wrong.