Torchvision ImageFolder resulting 9 stacked images

Hi, Can someone help me out?

I couldn’t figure why the ImageFolder from torchvision would cause one image to be duplicated 9 times?

31%20PM

Torch uses [CHW] channel order, not [HWC]. You need to reorder dims before plotting.

Got it. Supposed to use np.transpose() instead of reshape.

Thanks a lot~!