Hi Bran!



 stark:

I noticed the value returned by MSELoss function was not an average of individual losses of examples in the batch. For instance, considering the batch size = 2, the loss was different from the average of the two losses when batch size was 1 while inputs/ targets were kept the same.


Could you post a small, self-contained, runnable script, together with
its complete output, that illustrates this issue?  Don’t include a model
or anything – just hard wire the output and target tensors that you
pass to your loss function.
Best.
K. Frank