Hello, @ptrblck Sorry, I am asking you another question! When I am trying to print some images from the test loader but it is giving me an error.
TypeError: Invalid shape (1, 28, 8) for image data
However, my train loader is working fine. Cold you tell me, where I am doing wrong?
test_images = (test_img_df.iloc[:,:].values).astype('float32')
test_images = test_images.reshape(test_images.shape[0], 28, 28)

#Converting Images to tensor
test_tensor = torch.tensor(test_images)/255.0

#Train DataLoder Generator
test_loader = DataLoader(test_tensor, batch_size= config.batch_size, 
                              num_workers = 2,shuffle= True)

#Plot some sample images using the data generator
for data in test_tensor:
    img_grid = make_grid(data[0:8,].unsqueeze(1), nrow=8)
    break

plt.imshow(img_grid.numpy().transpose((1,2,0)))
plt.rcParams['figure.figsize'] = (10, 2)
plt.show()