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

KeyError: 'image_adapter.pos_embed' #48

Open
xxxxyliu opened this issue Jan 29, 2024 · 1 comment
Open

KeyError: 'image_adapter.pos_embed' #48

xxxxyliu opened this issue Jan 29, 2024 · 1 comment
Assignees

Comments

@xxxxyliu
Copy link

2024-01-28 15:51:36,396 - mmseg - INFO - load checkpoint from local path: /data/onepeace_seg_cocostuff2ade20k.pth
Traceback (most recent call last):
  File "/root/ONE-PEACE/one_peace_vision/seg/train.py", line 243, in <module>
    main()
  File "/root/ONE-PEACE/one_peace_vision/seg/train.py", line 203, in main
    model.init_weights()
  File "/opt/conda/envs/onepeace/lib/python3.8/site-packages/mmcv/runner/base_module.py", line 116, in init_weights
    m.init_weights()
  File "/root/ONE-PEACE/one_peace_vision/seg/mmseg_custom/models/backbones/onepeace.py", line 571, in init_weights
    state_dict = self.resize_abs_pos_embed(model)
  File "/root/ONE-PEACE/one_peace_vision/seg/mmseg_custom/models/backbones/onepeace.py", line 467, in resize_abs_pos_embed
    pos_embed_checkpoint = checkpoint['image_adapter.pos_embed']
KeyError: 'image_adapter.pos_embed'

I haven't changed the model structure, but I'm encountering an error when using pre-trained weights.

@logicwong logicwong self-assigned this Feb 5, 2024
@AndrewTKent
Copy link

@xxxxyliu Same situation for me - let me know if you figured out the solution.

@logicwong logicwong assigned simonJJJ and unassigned logicwong Apr 8, 2024
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