Solved by KFrank in post #2 
              
              
                Hi Arjun! 

The short answer is that you should just use the output of your last 
linear layer, with no activation function, as input to your loss function 
(for plain-vanilla use cases). 
I assume that you are asking about training a network to segment 
2d images, that is, the output of your networ…