Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save n0obcoder/e8677e884d282c45754e028f6676187e to your computer and use it in GitHub Desktop.

Select an option

Save n0obcoder/e8677e884d282c45754e028f6676187e to your computer and use it in GitHub Desktop.
# saving the entire model
torch.save(model, 'weights_only.pth')
# loading the entire model
model_new = torch.load('entire_model.pth')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment