how to save a model in pytorch examples
Example: 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.
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.