I assume the single channel was duplicated, since transforms.Normalize() has three values for mean and std. Also imshow contains a np.transpose with 3 dimensions, which also suggests duplicated channels.
However, if you are dealing with grayscale images and would like to keep a single channel, you are right and should set the number of input channels in the first conv layer to 1.