Last active
August 12, 2019 18:13
-
-
Save n0obcoder/1c2137b473e8d6623ca3660038db4ae9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # saving state_dict() of 'model' | |
| torch.save(model.state_dict(), 'weights_only.pth') | |
| # loading the state_dict | |
| model_new = NeuralNet() | |
| model_new.load_state_dict(torch.load('weights_only.pth')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment