1 Answers
JW297.00
2

If you have already designed your model, then you can save and load your weights in the following way.

model = MyNet()
...
torch.save(model.state_dict(), 'weights/model_{}'.format(epoch))
...
model.load_state_dict(torch.load('weights/model_10'))
Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?