I wrote my own dataset to load MNIST data, The images are getting loaded, but these 2D images (i.e only 1 channel), this causes problem in torch.nn.Conv2d which expects a 4D Tensor, I tried loading the images as 3D Tensor (32X32X1), but it still doesn’t work and gives size mis-match error, please help. I have also tried 3D tensor (1X32X32), it still doesn’t work kindly check this link for images and details, forum won’t allow me to put everything here.
size miss match and loading problems 4