glow-pytorch
glow-pytorch copied to clipboard
load checkpoints
Hi!
Great code, thanks for sharing.
How can I use checkpoint files in order to continue training sessions after pausing?
Eyal
You can use model.load_state_dict(torch.load('CHECKPOINT_PATH', map_location=lambda storage, loc: storage)) at this line https://github.com/rosinality/glow-pytorch/blob/master/train.py#L164.
I guess that the next line should be at :
https://github.com/rosinality/glow-pytorch/blob/master/train.py#L166.
optimizer.state_dict(torch.load('checkpoint/optim_012001.pt', map_location=lambda storage, loc: storage))
Am I right?
Yes, if you want to load optimizer states too.