Thank you so much @ptrblck for your explanations, I end-up plotting the training losses both ways and the losses calculated in model.train() is indeed follow the losses calculated in model.eval().

16%20PM757×357 67.4 KB

Also, thanks for pointing out the issues in my code!