Solved by vmirly1 in post #2 
              
              
                when you use reduction='none', it will compute the MSE-loss per element. So you can add an additional torch.sum() or torch.mean() after the output of MSE-loss. Alternatively, you can use reduction='sum' or reduction='mean' to the same thing. 
However, using reduction='none' gives you more flexibilit…