Closed tkelestemur closed 4 years ago
It is true that agent.load
loads both model and optimizer parameters. If you want to load model parameters only, you can directly use torch.load
for model
and pass it to your agent instead of calling agent.load
.
Oh yeah that makes sense. Thanks!
I'm working on a task-specific curriculum learning for RL. Basically, I train an PPO agent for a simple task, and using the saved weights, I train on a harder task. Before I start the training for the second task, I use
agent.load()
function to load network parameters. I realized thatagent.load()
function also loads the parameters for the optimizer.The problem is that I use learning rate decay for the first task. So if I the load last saved parameters, the optimizer would get a learning rate close to zero. Did I understand this correctly? If this is the case, the saved_attributes should be a parameter when we're creating the PPO agents.
Edit: below is a snippet from my training script: