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 pretrained model #1

Open
slowlypasser opened this issue Apr 20, 2022 · 6 comments
Open

the pretrained model #1

slowlypasser opened this issue Apr 20, 2022 · 6 comments

Comments

@slowlypasser
Copy link

can you provide the pretrained model of the swin-l?thanks a lot!

@Duankaiwen
Copy link
Owner

Duankaiwen commented Apr 20, 2022

@slowlypasser
Copy link
Author

@slowlypasser
Copy link
Author

@slowlypasser swin_large_patch4_window12_384_22k.pth

thanks!

i use the pretrained model to train my own datasets,but something goes wrong.
`2022-04-21 13:03:33,441 - mmdet - WARNING - The model and loaded state dict do not match exactly

unexpected key in source state_dict: norm.weight, norm.bias, head.weight, head.bias, layers.0.blocks.1.attn_mask, layers.1.blocks.1.attn_mask, layers.2.blocks.1.attn_mask, layers.2.blocks.3.attn_mask, layers.2.blocks.5.attn_mask, layers.2.blocks.7.attn_mask, layers.2.blocks.9.attn_mask, layers.2.blocks.11.attn_mask, layers.2.blocks.13.attn_mask, layers.2.blocks.15.attn_mask, layers.2.blocks.17.attn_mask

missing keys in source state_dict: norm0.weight, norm0.bias, norm1.weight, norm1.bias, norm2.weight, norm2.bias, norm3.weight, norm3.bias`

what's more, it throws the error IndexError: The shape of the mask [3437280] at index 0 does not match the shape of the indexed tensor [42966] at index 0

@Duankaiwen
Copy link
Owner

Duankaiwen commented Apr 21, 2022

Don't worry about the WARNING.
On line 105 in configs/pycenternet/pycenternet_swin_l_fpn_giou_mstrain_3x_coco.py, replace dict(type='LoadRPDV2Annotations'), with dict(type='LoadRPDV2Annotations', num_classes=xxx), where xxx is the num_classes in your dataset.

@slowlypasser
Copy link
Author

thanks for your reply!i replace it ,and it works well!

@wlf-darkmatter
Copy link

Thanks so much, it works too.

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

3 participants