Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pytorch save model

Saving:
	torch.save(model, PATH)


Loading: 
	model = torch.load(PATH)
	model.eval()
    
A common PyTorch convention is to save models using either a .pt or .pth file extension.
 
PREVIOUS NEXT
Tagged: #pytorch #save #model
ADD COMMENT
Topic
Name
5+4 =