Solved by gfrogat in post #2 
              
              
                Hi 
You call model.eval() at line 81 but forget to set the model to train mode again when you run start the second epoch. 
Adding model.train() after line 47 will remove the error.