Closed xylee95 closed 3 years ago
The agent will switch back to the original mode automatically once it leaves the with agent.eval_mode()
context.
print("training", agent.training)
with agent.eval_mode():
print("training", agent.training)
print("training", agent.training)
will print
training True
training False
training True
Great, thank you for clarifying!
How do I switch back the agent to training mode after using
with agent.eval_mode()
?I'm following the quick-start example and I want to evaluate my agent intermittently during training, rather than at the end of the training. What is the proper way of returning the agent to training setting after running a certain number of episodes of evaluation?
I'm writing my own custom training loop rather than using the pre-defined experiments function.