I’m trying to plot MNIST dataset image but it showing error to me. On loading MNIST datsets in 4 batch sizes, printing images.shape is giving me --→ torch.Size([4, 1, 28, 28]).
Channel is 1 as it’s not colored image. While plotting it’s showing ‘Invalid Shape’.
I tried squeezing it using -→ npimg = npimg.squeeze(axis=0) --→ still it showing error as ‘ValueError: cannot select an axis to squeeze out which has size not equal to one’.
I want to know how can I plot these images? and how can i see all the images?