Thanks. I transformed the txt files to grayscale images using matplotlib’s imsave(cmap=plt.cm.gray). When I use a ToTensor() transform on such an image opened with PIL’s open method I get a tensor shape of [4, 256, 256]. Since the images are grayscale, shouldn’t I get [1, 256, 256]? Many thanks.