Thank you. I am working on a multi-class segmentation like what you described, but I actually have 4 classes. My label is a grayscale (1D for the color channel) with 4 possible values. And my output is of the same size of the image (3 color channels and 192x144 of height and width). Could you please explain why should the output have this exact shape in this case ?
Moreover, when I am loading my label I first used the transform ToTensor() (but it puts everything in the range from 0 to 1) so I changed it to a transform that replaces it with integers form [0, 3] (because there are 4 classes).  Is it correct to do it that way ?