ptrblck:

Sometimes an unwanted broadcasting takes place in the loss calculation, if you don’t pass an output and target in the same shape to nn.MSELoss , which should raise a warning but if often overlooked.


Excellent answer. thank you so much ptrblck. The loss is 500 now.