On my ML class my teacher give us the MNIST data and let us train that using CNN.
The data is in a matlab .mat file: https://file.io/PS0CtiK2aom6
I managed to turn that into a numpy array of (60000, 784)
(60000 train data and each of them is 28x28=784)
Also the label (numbers 0-9) is stored in a (60000, 1) array
Now I need to load it into a torch.utils.data.DataLoader
but all I find on the internet is the dataset from pytorch itself torchvision.datasets.MNIST
and I am not sure if my data has the same shape and structure with pytorch's
Any Ideas? Thanks!
Edit after you shared your dataset, you can use:
Output:
Input data:
Old answer
You can use
DataLoaderwith your data:However is not sufficient. Where are your targets?
I used the
matfile from here. Full example:Input data: