Solved by morrohype in post #5 
              
              
                Thank you for the answer again. I found the solution. The network was in .eval(). Turning it into train-mode with model.train() solved the error.