Hi,
I want to able to have a model/optimiser/scheduler object - which I can hot plug and play.
So for example, have a list of such objects, load to gpu in turn, do some training, switch objects.
Maybe then load some earlier ones and pick up training where we left off last time.
I’d like to be able to easily (deep) copy these objects, and save/load to disk.
Note - some models or optimisers or schedulers may be different in these different objects.
One idea - use the torch.save(model) - this will pickle the model class and reproduce the object and load the state_dict, but will it restore the scheduler/optimiser?
Can I use torch.save with these as well to reproduce them later?
How do I control which model they are attached to?
And how can I duplicate the whole model/optimizer/scheduler whilst in memory?
Any suggestions on the best way to do this please?
Many thanks in advance!