Skip to content
Discussion options

You must be logged in to vote

If you include model.eval() is just to ensure that the model is training, also is not mandatory to include model.eval() if you include model.train(), model.train() is like to make 100% sure that you are training and avoid anomalies from your model.

If model.eval() is not included the model will remain in the previous state, so add model.eval() is a good practice. for example if the model was in test mode before the loop and the loop does not explicitly change the mode to training maybe will lead to undesirably behavior and affect training.

If model.train() was not included while functionalizing the training loop maybe the professor was 100% sure that there were not another state before, b…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@ShahidNawaz01
Comment options

@otrturn
Comment options

@jhoanmartinez
Comment options

Answer selected by ShahidNawaz01
@ShahidNawaz01
Comment options

@otrturn
Comment options

@otrturn
Comment options

@otrturn
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants