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

Error loading model with timm==0.9.7 #245

Open
lzqsd opened this issue Oct 10, 2023 · 1 comment
Open

Error loading model with timm==0.9.7 #245

lzqsd opened this issue Oct 10, 2023 · 1 comment

Comments

@lzqsd
Copy link

lzqsd commented Oct 10, 2023

Hi there,

I tried to load the pretrained model but met an error "Unexpected key(s) in state_dict: "pretrained.model.blocks.0.attn.relative_position_index", ....". I found that this error only happened with timm=0.9.7 and would be gone with timm==0.6.7. I wonder if there is any plan to support the newest timm. Thanks!

@lzqsd
Copy link
Author

lzqsd commented Oct 26, 2023

I can load the model again by removing all item in weight containing "relative_position_index".

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