krishnamurthy:

You need to access it via the DataLoader object, for the transforms to be applied.


I tried to find where I could match the example from PyTorch website and I found an instance having Compose 3:

image.png972×493 40.6 KB

I am using the DataLoader already, where exactly the first parameter 3 is a Dataset.
I provided that first parameter because torchvision.datasets.MNIST(... is a Dataset.