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
RuntimeError: Error(s) in loading state_dict for SparseFormer: Missing key(s) in state_dict: "norm.weight", "norm.bias", "proj.weight", "proj.bias". Unexpected key(s) in state_dict: "head.norm.weight", "head.norm.bias", "head.classifier.weight", "head.classifier.bias"
The text was updated successfully, but these errors were encountered:
Hi, the usage in test_main.py is outdated. We recommend using create_model in README.md to create the model:
test_main.py
create_model
from sparseformer.factory import create_model model = create_model("sparseformer_v1_tiny", download=True)
If you prefer to stick to this way, you can rename the keys in the state dict as the error message says
head.norm.weight -> norm.weight head.norm.bias -> norm.bias head.classifier.weight -> proj.weight head.classifier.bias -> proj.bias
Will update soon.
Sorry, something went wrong.
No branches or pull requests
RuntimeError: Error(s) in loading state_dict for SparseFormer:
Missing key(s) in state_dict: "norm.weight", "norm.bias", "proj.weight", "proj.bias".
Unexpected key(s) in state_dict: "head.norm.weight", "head.norm.bias", "head.classifier.weight", "head.classifier.bias"
The text was updated successfully, but these errors were encountered: