xiaomabufei / FGAHOI

29 stars 4 forks source link

About test on HICO-DET #11

Closed jianke0604 closed 1 year ago

jianke0604 commented 1 year ago

Thank you very much for your work! When I run the test command, exactly export CUDA_VISIBLE_DEVICES=1,2; python -m torch.distributed.run --nproc_per_node=2 --use_env main.py --backbone swin_large --dataset_file hico --resume "params/swin_large.pth" --num_verb_classes 117 --num_obj_classes 80 --output_dir logs --epochs 150 --lr_drop 120 --num_feature_levels 3 --num_queries 300 --merge --hierarchical_merge --task_merge --eval --hoi_path data/hico_20160224_det on my machine,some errors have occurred. The error message are as follows: Traceback (most recent call last): File "/home/qinxiaohan/FGAHOI/main.py", line 446, in <module> main(args) File "/home/qinxiaohan/FGAHOI/main.py", line 274, in main model, criterion, postprocessors = build_model_main(args) File "/home/qinxiaohan/FGAHOI/main.py", line 234, in build_model_main model, criterion, postprocessors = build_dab_deformable_detr(args) File "/home/qinxiaohan/FGAHOI/models/dab_deformable_detr/dab_deformable_detr.py", line 729, in build_dab_deformable_detr backbone = build_backbone(args) File "/home/qinxiaohan/FGAHOI/models/dab_deformable_detr/backbone.py", line 151, in build_backbone backbone = Backbone( File "/home/qinxiaohan/FGAHOI/models/dab_deformable_detr/backbone.py", line 124, in __init__ super().__init__(backbone, backbone_name, num_feature_levels, pretrained) File "/home/qinxiaohan/FGAHOI/models/dab_deformable_detr/backbone.py", line 69, in __init__ backbone.init_weights(pretrained) File "/home/qinxiaohan/FGAHOI/models/dab_deformable_detr/swin_transformer.py", line 719, in init_weight load_checkpoint(self, pretrained, strict=False) File "/home/qinxiaohan/FGAHOI/models/dab_deformable_detr/swin_transformer.py", line 144, in load_checkpoint table_current = model.state_dict()[table_key] KeyError: 'backbone.0.body.layers.0.blocks.0.attn.relative_position_bias_table' I think this error means the key backbone.0.body.layers.0.blocks.0.attn.relative_position_bias_table is missed, but ths parameter strict is already set to False. I don't understand the code enough right now, so I don't know how to solve this problem :sob:. What do you think about this error? I would be very grateful if you could make some suggestions on this issue!