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

The model and loaded state dict do not match exactly #775

Open
Zhcyoung opened this issue Dec 25, 2023 · 0 comments
Open

The model and loaded state dict do not match exactly #775

Zhcyoung opened this issue Dec 25, 2023 · 0 comments
Assignees

Comments

@Zhcyoung
Copy link

I pretrained a self-supervised model (BEiT) using my own data, but encountered an error after using ./tools/model_converters/extract_backbone_weights.py extract the backbone. This error still exists when I use the given imageNet weights. Is this a normal phenomenon?

The model and loaded state dict do not match exactly

unexpected key in source state_dict: backbone.mask_token, 
backbone.rel_pos_bias.relative_position_bias_table, backbone.rel_pos_bias.relative_position_index

missing keys in source state_dict: backbone.layers.0.attn.relative_position_bias_table, backbone.layers.0.attn.relative_position_index, 
backbone.layers.1.attn.relative_position_bias_table, backbone.layers.1.attn.relative_position_index, 
backbone.layers.2.attn.relative_position_bias_table, backbone.layers.2.attn.relative_position_index, 
backbone.layers.3.attn.relative_position_bias_table, backbone.layers.3.attn.relative_position_index, 
backbone.layers.4.attn.relative_position_bias_table, backbone.layers.4.attn.relative_position_index, 
backbone.layers.5.attn.relative_position_bias_table, backbone.layers.5.attn.relative_position_index, 
backbone.layers.6.attn.relative_position_bias_table, backbone.layers.6.attn.relative_position_index, 
backbone.layers.7.attn.relative_position_bias_table, backbone.layers.7.attn.relative_position_index, 
backbone.layers.8.attn.relative_position_bias_table, backbone.layers.8.attn.relative_position_index, 
backbone.layers.9.attn.relative_position_bias_table, backbone.layers.9.attn.relative_position_index, 
backbone.layers.10.attn.relative_position_bias_table, backbone.layers.10.attn.relative_position_index, 
backbone.layers.11.attn.relative_position_bias_table, backbone.layers.11.attn.relative_position_index, backbone.ln2.weight, 
backbone.ln2.bias, head.fc.weight, head.fc.bias
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

2 participants