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

Key Mismatch for Swin #13

Open
YuchuanTian opened this issue Nov 25, 2022 · 6 comments
Open

Key Mismatch for Swin #13

YuchuanTian opened this issue Nov 25, 2022 · 6 comments

Comments

@YuchuanTian
Copy link

When I am loading Swin checkpoint mask_rcnn_swin_small_patch4_window7.pth, I encountered a key mismatch:

load checkpoint from local path: checkpoints/mask_rcnn_swin_small_patch4_window7.pth
The model and loaded state dict do not match exactly

unexpected key in source state_dict: neck.fpn_convs.0.conv.weight, neck.fpn_convs.0.conv.bias, neck.fpn_convs.1.conv.weight, neck.fpn_convs.1.conv.bias, neck.fpn_convs.2.conv.weight, neck.fpn_convs.2.conv.bias, neck.fpn_convs.3.conv.weight, neck.fpn_convs.3.conv.bias

missing keys in source state_dict: backbone.layers.0.qdatt.ChannelGate.mlp.0.decoder.V, backbone.layers.0.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, backbone.layers.0.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, backbone.layers.0.qdatt.ChannelGate.mlp.2.decoder.V, backbone.layers.0.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, backbone.layers.0.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, backbone.layers.0.qdatt.SpatialGate.spatial.decoder.V, backbone.layers.0.qdatt.SpatialGate.spatial.decoder.decoder.weight, backbone.layers.0.qdatt.SpatialGate.spatial.decoder.decoder.bias, backbone.layers.1.qdatt.ChannelGate.mlp.0.decoder.V, backbone.layers.1.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, backbone.layers.1.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, backbone.layers.1.qdatt.ChannelGate.mlp.2.decoder.V, backbone.layers.1.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, backbone.layers.1.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, backbone.layers.1.qdatt.SpatialGate.spatial.decoder.V, backbone.layers.1.qdatt.SpatialGate.spatial.decoder.decoder.weight, backbone.layers.1.qdatt.SpatialGate.spatial.decoder.decoder.bias, backbone.layers.2.qdatt.ChannelGate.mlp.0.decoder.V, backbone.layers.2.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, backbone.layers.2.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, backbone.layers.2.qdatt.ChannelGate.mlp.2.decoder.V, backbone.layers.2.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, backbone.layers.2.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, backbone.layers.2.qdatt.SpatialGate.spatial.decoder.V, backbone.layers.2.qdatt.SpatialGate.spatial.decoder.decoder.weight, backbone.layers.2.qdatt.SpatialGate.spatial.decoder.decoder.bias, backbone.layers.3.qdatt.ChannelGate.mlp.0.decoder.V, backbone.layers.3.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, backbone.layers.3.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, backbone.layers.3.qdatt.ChannelGate.mlp.2.decoder.V, backbone.layers.3.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, backbone.layers.3.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, backbone.layers.3.qdatt.SpatialGate.spatial.decoder.V, backbone.layers.3.qdatt.SpatialGate.spatial.decoder.decoder.weight, backbone.layers.3.qdatt.SpatialGate.spatial.decoder.decoder.bias, neck.fpn_down.0.qdatt.ChannelGate.mlp.0.decoder.V, neck.fpn_down.0.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, neck.fpn_down.0.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, neck.fpn_down.0.qdatt.ChannelGate.mlp.2.decoder.V, neck.fpn_down.0.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, neck.fpn_down.0.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, neck.fpn_down.0.qdatt.SpatialGate.spatial.decoder.V, neck.fpn_down.0.qdatt.SpatialGate.spatial.decoder.decoder.weight, neck.fpn_down.0.qdatt.SpatialGate.spatial.decoder.decoder.bias, neck.fpn_down.1.qdatt.ChannelGate.mlp.0.decoder.V, neck.fpn_down.1.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, neck.fpn_down.1.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, neck.fpn_down.1.qdatt.ChannelGate.mlp.2.decoder.V, neck.fpn_down.1.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, neck.fpn_down.1.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, neck.fpn_down.1.qdatt.SpatialGate.spatial.decoder.V, neck.fpn_down.1.qdatt.SpatialGate.spatial.decoder.decoder.weight, neck.fpn_down.1.qdatt.SpatialGate.spatial.decoder.decoder.bias, neck.fpn_down.2.qdatt.ChannelGate.mlp.0.decoder.V, neck.fpn_down.2.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, neck.fpn_down.2.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, neck.fpn_down.2.qdatt.ChannelGate.mlp.2.decoder.V, neck.fpn_down.2.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, neck.fpn_down.2.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, neck.fpn_down.2.qdatt.SpatialGate.spatial.decoder.V, neck.fpn_down.2.qdatt.SpatialGate.spatial.decoder.decoder.weight, neck.fpn_down.2.qdatt.SpatialGate.spatial.decoder.decoder.bias

Is this mismatch expected? Thanks!

@Mr-Bigworth
Copy link

这个实际上并不影响,因为这些缺少的权重就是作者添加的模块。

@Mr-Bigworth
Copy link

但是想请教一下,bert你们是怎么准备的哇,bert-base-uncased我应该怎样下载然后放到哪个目录呢

@zzoneee
Copy link

zzoneee commented Aug 2, 2023

但是想请教一下,bert你们是怎么准备的哇,bert-base-uncased我应该怎样下载然后放到哪个目录呢

在这里下载:https://huggingface.co/bert-base-uncased
放到checkpoints目录下

@Mr-Bigworth
Copy link

但是想请教一下,bert你们是怎么准备的哇,bert-base-uncased我应该怎样下载然后放到哪个目录呢

在这里下载:https://huggingface.co/bert-base-uncased 放到checkpoints目录下

谢谢!!

@0713qq
Copy link

0713qq commented Aug 8, 2024

When I am loading Swin checkpoint mask_rcnn_swin_small_patch4_window7.pth, I encountered a key mismatch:

load checkpoint from local path: checkpoints/mask_rcnn_swin_small_patch4_window7.pth The model and loaded state dict do not match exactly

unexpected key in source state_dict: neck.fpn_convs.0.conv.weight, neck.fpn_convs.0.conv.bias, neck.fpn_convs.1.conv.weight, neck.fpn_convs.1.conv.bias, neck.fpn_convs.2.conv.weight, neck.fpn_convs.2.conv.bias, neck.fpn_convs.3.conv.weight, neck.fpn_convs.3.conv.bias

missing keys in source state_dict: backbone.layers.0.qdatt.ChannelGate.mlp.0.decoder.V, backbone.layers.0.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, backbone.layers.0.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, backbone.layers.0.qdatt.ChannelGate.mlp.2.decoder.V, backbone.layers.0.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, backbone.layers.0.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, backbone.layers.0.qdatt.SpatialGate.spatial.decoder.V, backbone.layers.0.qdatt.SpatialGate.spatial.decoder.decoder.weight, backbone.layers.0.qdatt.SpatialGate.spatial.decoder.decoder.bias, backbone.layers.1.qdatt.ChannelGate.mlp.0.decoder.V, backbone.layers.1.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, backbone.layers.1.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, backbone.layers.1.qdatt.ChannelGate.mlp.2.decoder.V, backbone.layers.1.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, backbone.layers.1.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, backbone.layers.1.qdatt.SpatialGate.spatial.decoder.V, backbone.layers.1.qdatt.SpatialGate.spatial.decoder.decoder.weight, backbone.layers.1.qdatt.SpatialGate.spatial.decoder.decoder.bias, backbone.layers.2.qdatt.ChannelGate.mlp.0.decoder.V, backbone.layers.2.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, backbone.layers.2.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, backbone.layers.2.qdatt.ChannelGate.mlp.2.decoder.V, backbone.layers.2.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, backbone.layers.2.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, backbone.layers.2.qdatt.SpatialGate.spatial.decoder.V, backbone.layers.2.qdatt.SpatialGate.spatial.decoder.decoder.weight, backbone.layers.2.qdatt.SpatialGate.spatial.decoder.decoder.bias, backbone.layers.3.qdatt.ChannelGate.mlp.0.decoder.V, backbone.layers.3.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, backbone.layers.3.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, backbone.layers.3.qdatt.ChannelGate.mlp.2.decoder.V, backbone.layers.3.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, backbone.layers.3.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, backbone.layers.3.qdatt.SpatialGate.spatial.decoder.V, backbone.layers.3.qdatt.SpatialGate.spatial.decoder.decoder.weight, backbone.layers.3.qdatt.SpatialGate.spatial.decoder.decoder.bias, neck.fpn_down.0.qdatt.ChannelGate.mlp.0.decoder.V, neck.fpn_down.0.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, neck.fpn_down.0.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, neck.fpn_down.0.qdatt.ChannelGate.mlp.2.decoder.V, neck.fpn_down.0.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, neck.fpn_down.0.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, neck.fpn_down.0.qdatt.SpatialGate.spatial.decoder.V, neck.fpn_down.0.qdatt.SpatialGate.spatial.decoder.decoder.weight, neck.fpn_down.0.qdatt.SpatialGate.spatial.decoder.decoder.bias, neck.fpn_down.1.qdatt.ChannelGate.mlp.0.decoder.V, neck.fpn_down.1.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, neck.fpn_down.1.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, neck.fpn_down.1.qdatt.ChannelGate.mlp.2.decoder.V, neck.fpn_down.1.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, neck.fpn_down.1.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, neck.fpn_down.1.qdatt.SpatialGate.spatial.decoder.V, neck.fpn_down.1.qdatt.SpatialGate.spatial.decoder.decoder.weight, neck.fpn_down.1.qdatt.SpatialGate.spatial.decoder.decoder.bias, neck.fpn_down.2.qdatt.ChannelGate.mlp.0.decoder.V, neck.fpn_down.2.qdatt.ChannelGate.mlp.0.decoder.decoder.weight, neck.fpn_down.2.qdatt.ChannelGate.mlp.0.decoder.decoder.bias, neck.fpn_down.2.qdatt.ChannelGate.mlp.2.decoder.V, neck.fpn_down.2.qdatt.ChannelGate.mlp.2.decoder.decoder.weight, neck.fpn_down.2.qdatt.ChannelGate.mlp.2.decoder.decoder.bias, neck.fpn_down.2.qdatt.SpatialGate.spatial.decoder.V, neck.fpn_down.2.qdatt.SpatialGate.spatial.decoder.decoder.weight, neck.fpn_down.2.qdatt.SpatialGate.spatial.decoder.decoder.bias

Is this mismatch expected? Thanks!

请问这个问题你解决了吗,我也遇到了相同的问题

@YuchuanTian
Copy link
Author

YuchuanTian commented Aug 8, 2024 via email

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

4 participants