Skip to content

KeyError: 'image_adapter.pos_embed' #48

Open
@Xy-unu

Description

@Xy-unu
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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions