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 swin-l error #27

Open
WEIZHIHONG720 opened this issue Feb 10, 2023 · 1 comment
Open

load swin-l error #27

WEIZHIHONG720 opened this issue Feb 10, 2023 · 1 comment

Comments

@WEIZHIHONG720
Copy link

WEIZHIHONG720 commented Feb 10, 2023

2023-02-09 22:24:00,150 - mmdet - INFO - Set random seed to 1703709815, deterministic: False
2023-02-09 22:24:02,166 - mmdet - INFO - load checkpoint from http path: https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_large_patch4_window7_224_22kto1k.pth
Traceback (most recent call last):
File "./train.py", line 242, in
main()
File "./train.py", line 216, in main
model.init_weights()
File "/media/workspace/weizhihong/code/opera/third_party/mmcv/mmcv/runner/base_module.py", line 117, in init_weights
m.init_weights()
File "/media/workspace/weizhihong/code/opera/third_party/mmdetection/mmdet/models/backbones/swin.py", line 705, in init_weights
if list(state_dict.keys())[0].startswith('module.'):
IndexError: list index out of range

@Yamameeee
Copy link

You should add convert_weights=True to backbone config like official mmdet swin config.

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