I’m new to pytorch. I’m facing a strange issue with respect to using my own custom MNIST dataset.
In order to debug the issue, I’m first comparing MNIST from torchvision datasets against MNIST from a txt file (txt file was created from a numpy array).
I apply the same transformations as used in torchvision datasets; which seems to be ToTensor() and appropriate casting to types that the model expects.
Basic statistics indicate that the two datasets are identical in terms of min, max, mean, and variance, as well as shape:
torchvision dataset
image899×61 9.26 KB

txt dataset

When I train the model on torchvision dataset, the training loss goes down rapidly; while when training on the txt dataset, it gets stuck;
image919×597 52 KB
Any idea what could be happening here? Thank you so much for any pointers you can provide.