I am trying to do Semantic Segmentation in PyTorch.
Before passing the image through the segmentation network, I downsample the image to size (321x321). (I also apply the same downsampling to the ground truth segmentation mask to retain the pixel-level correspondence)
Once I pass this (321x321) size image through the segmentation network, I get a 41x41xC sized per-class prediction map, where C is the number of classes.
To calculate the loss, I have to either Upsample the prediction map from 41x41xC to 321x321xC or downsample the ground truth segmentation mask to 41x41.  Which one should I pick?
Also, if I have to upsample the ground truth segmentation mask, what is the right way to do fractional upsampling?