time-series-forecasting-pytorch icon indicating copy to clipboard operation
time-series-forecasting-pytorch copied to clipboard

MSEloss by default uses 'mean' as reduction method

Open akiori opened this issue 2 years ago • 1 comments

MSEloss by default uses 'mean' as reduction method, so I think epoch_loss += (loss.detach().item() / batchsize) is incorrect

akiori avatar Nov 15 '22 07:11 akiori

I came in to write the same thing. Besides, now the loss is accumulating on every butch. More precisely, the loss / batchsize value is accumulated. It seems to me more logical to output the loss value on the last batch of training.

Alex-177 avatar May 22 '23 12:05 Alex-177