I downloaded all the files shared by @skynet10100 and did the following steps:


Uploaded to my google drive. Inside “MNIST” folder.


Did the mount:


import os
import sys
from google.colab import drive
drive.mount(’/content/gdrive/’)
data_file_location = “/content/gdrive/MyDrive/MNIST/”
os.chdir(data_file_location)

Declared the path/ source for MNIST:

mnist_data = torchvision.datasets.MNIST(’/content/gdrive/MyDrive/MNIST/’)

Created the dataloader (Train Loader particularly):

dl = torch.utils.data.DataLoader(mnist_data, batch_size=16, shuffle=False)
The only thing I was not able to achieve is using transform. If I am not wrong, torch.utils.data.DataLoader doesn’t allow to use transform.
If anyone knows how to achieve it, please let me know about it. It would be a great help.