Solved by Dipam_Vasani in post #3 
              
              
                What you are loading is the train_loader.  You can get a batch of images from it using 
images, labels = next(iter(train_loader))

The shapes of these are as follows 
images.shape
> (torch.Size([128, 1, 28, 28]))

For plotting you need to use the last 2 dimensions (width and height) 
plt.imshow(imag…