PIL returns the size as [width, height] without the number of channels.
ToTensor() permutes the image array to [channels, height, width], which is the expected input shape for image tensors for 2-dimensional modules, so your shape looks alright.