Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

save and load model pytorch

torch.save(model.state_dict(), filepath)

#Later to restore:
model.load_state_dict(torch.load(filepath))
model.eval()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #save #load #model #pytorch
ADD COMMENT
Topic
Name
4+3 =