02_pytorch_classification - 89 : model.train() and model.eval() #1246
Unanswered
dirk-kappel-effectual
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I notice that the book version does not set the model_3.train() as you do in the video version at the beginning of each epoch. Prior to Testing being performed during each epoch the model gets set to eval() mode. How does the model reset itself to train (or does it?) within the for loop (In the Book Version) if the model is never set back to train() mode at the start of each epoch? I ran the model using the Book Version code (without resetting to train()) and my results are the same as the video version.
Book Version Code:
https://www.learnpytorch.io/02_pytorch_classification/#63-training-a-model-with-non-linearity
This is a snippet of what the video version looks like:
Beta Was this translation helpful? Give feedback.
All reactions