Solved by ptrblck in post #2 
              
              
                Usually you would just calculate the training accuracy on-the-fly without setting the model to eval() and recalculate the “real” training accuracy for this epoch. Mostly because it’s just too expensive and the running loss estimate is often good enough. 
That being said, there are some issues in you…