Is my format for loading MNIST data from the root directory correct?

Hi,
I am trying to modiy a tutorial where instead of downloading the MNIST data, it is reading from the saved root directory which I have already downloaded.
Am I doing it correctly because I am getting Dataset not found error.
Below is my code for train and test loader, hvd.rank() modification is for horovod changes and are taken from here

train_dataset = \
   datasets.MNIST('/scratch/netra/MNIST/processed/training.pt-%d' % hvd.rank(), train=True, download=False,
                   transform=transforms.Compose([
                       transforms.ToTensor(),
                       transforms.Normalize((0.1307,), (0.3081,))
                   ]))
train_dataset = \
   datasets.MNIST('/scratch/netra/MNIST/processed/test.pt-%d' % hvd.rank(), train=True, download=False,
                   transform=transforms.Compose([
                       transforms.ToTensor(),
                       transforms.Normalize((0.1307,), (0.3081,))
                   ]))

The MNIST dataset expects a path to the folder containing the dataset, not the path to specific *.pt files, so you would need to change this.

1 Like

I changed it, still the same problem. I am suspecting the problems are coming due to horovod changes in the path.