xsquared:

What I am trying to say is if thetraining_loop function changes the state of model? model will then be fed to validate. Is this whats happening?


Yes. The model’s weight get update after each epoch of the training_loop function. Its values get updated. So the validate function will automatically see those updated values when you pass model as an argument