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

load model error #1

Open
sxpro opened this issue Jul 25, 2024 · 0 comments
Open

load model error #1

sxpro opened this issue Jul 25, 2024 · 0 comments

Comments

@sxpro
Copy link

sxpro commented Jul 25, 2024

when loading "ava.ckpt.pth", i meet :

*** RuntimeError: Error(s) in loading state_dict for Swin:
Missing key(s) in state_dict: "vit.layers.3.downsample.reduction.weight", "vit.layers.3.downsample.norm.weight", "vit.layers.3.downsample.norm.bias", "vit.head.fc.weight", "vit.head.fc.bias".
Unexpected key(s) in state_dict: "vit.layers.0.downsample.reduction.weight", "vit.layers.0.downsample.norm.weight", "vit.layers.0.downsample.norm.bias", "vit.layers.0.blocks.1.attn_mask", "vit.layers.1.blocks.1.attn_mask", "vit.layers.2.blocks.1.attn_mask", "vit.layers.2.blocks.3.attn_mask", "vit.layers.2.blocks.5.attn_mask", "vit.layers.2.blocks.7.attn_mask", "vit.layers.2.blocks.9.attn_mask", "vit.layers.2.blocks.11.attn_mask", "vit.layers.2.blocks.13.attn_mask", "vit.layers.2.blocks.15.attn_mask", "vit.layers.2.blocks.17.attn_mask", "vit.head.weight", "vit.head.bias".
size mismatch for vit.layers.1.downsample.reduction.weight: copying a param with shape torch.Size([512, 1024]) from checkpoint, the shape in current model is torch.Size([256, 512]).
size mismatch for vit.layers.1.downsample.norm.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
size mismatch for vit.layers.1.downsample.norm.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
size mismatch for vit.layers.2.downsample.reduction.weight: copying a param with shape torch.Size([1024, 2048]) from checkpoint, the shape in current model is torch.Size([512, 1024]).
size mismatch for vit.layers.2.downsample.norm.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
size mismatch for vit.layers.2.downsample.norm.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).

Could u help me to solve this?

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