Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save Model State Dictionary #29

Open
Sukanyasingh3 opened this issue Dec 13, 2023 · 0 comments
Open

Save Model State Dictionary #29

Sukanyasingh3 opened this issue Dec 13, 2023 · 0 comments

Comments

@Sukanyasingh3
Copy link

When saving the model state dictionary, you use both torch.save(model, ...) and torch.save(model.state_dict(), ...). It's recommended to use the latter (state_dict()) for saving only the parameters, which is more memory-efficient. If you use torch.save(model, ...), it saves the entire model, including unnecessary information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant