Lesson 12 - how to save and reload a model to continue training?

Hi all,

in dl2/wgan.ipynb, the last cell saves the model I believe:

torch.save(netG.state_dict(), TMP_PATH/‘netG_2.h5’)
torch.save(netD.state_dict(), TMP_PATH/‘netD_2.h5’)

But then how can i reload this model later on to continue training it ?
I’ve tried this code but I’m not sure how to call my model:

torch.load(TMP_PATH/‘netG_2.h5’)
torch.load(TMP_PATH/‘netD_2.h5’)
model.load_state_dict(netG.state_dict())
model.load_state_dict(netD.state_dict())