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

Mismatch Between Pre-trained Weights and Model Structure in SwinV2-Tiny Encoder: relative_coords_table/relative_position_index/attn_mask #372

Open
sIHURs opened this issue Dec 1, 2024 · 0 comments

Comments

@sIHURs
Copy link

sIHURs commented Dec 1, 2024

Hello everyone,

I want to use the SwinV2 model as an encoder in my project, specifically the tiny version (swinv2_tiny_patch4_window8_256) of the model. However, after comparing the pre-trained weights provided in the README with the model's structural output, I found that the following layers from the pre-trained weights are not present in the model:

layers.0.blocks.1.attn_mask: torch.Size([64, 64, 64])  
layers.0.blocks.0.attn.relative_coords_table: torch.Size([1, 15, 15, 2])  


layers.0.blocks.0.attn.relative_position_index: torch.Size([64, 64])  

Could someone please help explain this? I would greatly appreciate it!

Yifan

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