Deep-Reinforcement-Learning-Algorithms-with-PyTorch icon indicating copy to clipboard operation
Deep-Reinforcement-Learning-Algorithms-with-PyTorch copied to clipboard

feat: add a way of resuming training

Open pedrohbtp opened this issue 6 years ago • 1 comments
trafficstars

First of all, great work with the library!

My understanding of the library is that it starts training from scratch every time. Would there be an easy way of making possible to resume training for an agent?

I would be glad to try to help if you could give some guidance.

Thanks!

pedrohbtp avatar Sep 02 '19 12:09 pedrohbtp

You could write a save/load method for the network parameters in the Base_Agent. As actor-critic/q/gradient methods have different (number of) networks you could filter the Base_Agent.dict class for nn.Module instances and save those to file/ load them to the agent. At least this is how I implemented it to load different agents for inference

almajo avatar Oct 01 '19 08:10 almajo