Skip to content

KeyError: 'roi_heads.mask_head.predictor.weight' #7

@dashenfeng

Description

@dashenfeng

Hello!When I run the bash finetuning.sh ,

## # For test all base + novel classes
python3 -m tools.ckpt_surgery --coco \
        --src1 checkpoints/coco/${network}/${network}_R_${arch}_FPN_base${suffix}/model_final.pth \
        --src2 checkpoints/coco/${network}/${network}_R_${arch}_FPN_ft_novel_${shot}shot${suffix}${suffix2}/model_final.pth \
        --method combine \
        --save-dir checkpoints/coco/${network}/${network}_R_${arch}_FPN_all_final_${shot}shot${suffix}${suffix2}
#

I got the error:

Traceback (most recent call last):
File "/home/ecust/1TSSD/anaconda3/envs/iFS-RCNN/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/ecust/1TSSD/anaconda3/envs/iFS-RCNN/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ecust/1TSSD/ycf/iFS-RCNN/tools/ckpt_surgery.py", line 343, in
combine_ckpts(args)
File "/home/ecust/1TSSD/ycf/iFS-RCNN/tools/ckpt_surgery.py", line 140, in combine_ckpts
surgery_loop(args, surgery)
File "/home/ecust/1TSSD/ycf/iFS-RCNN/tools/ckpt_surgery.py", line 236, in surgery_loop
surgery(param_name, True, tar_size_dict[param_name], ckpt, ckpt2)
File "/home/ecust/1TSSD/ycf/iFS-RCNN/tools/ckpt_surgery.py", line 98, in surgery
pretrained_weight = ckpt['model'][weight_name_temp]
KeyError: 'roi_heads.mask_head.predictor.weight'

I want to know why it happened?

Metadata

Metadata

Assignees

No one assigned

    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