We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
weights_only=False
Here in loading a checkpoint
model = TheModelClass(*args, **kwargs) optimizer = TheOptimizerClass(*args, **kwargs) checkpoint = torch.load(PATH, weights_only=True) model.load_state_dict(checkpoint['model_state_dict']) optimizer.load_state_dict(checkpoint['optimizer_state #...
One should load all the model not weights only:
checkpoint = torch.load(PATH, weights_only=True)
to
checkpoint = torch.load(PATH, weights_only=False)
The text was updated successfully, but these errors were encountered:
You should carefully read https://pytorch.org/docs/stable/generated/torch.load.html. It is insecure to set weights_only to False.
Sorry, something went wrong.
No branches or pull requests
📚 Documentation
Here in loading a checkpoint
One should load all the model not weights only:
to
The text was updated successfully, but these errors were encountered: