GuangxingHan / QA-FewDet

Code for ICCV 2021 paper: 'Query Adaptive Few-Shot Object Detection with Heterogeneous Graph Convolutional Networks'
31 stars 6 forks source link

Why do dimensions not match? #8

Open tutu-star opened 1 year ago

tutu-star commented 1 year ago

Hello, author. However, I encountered this problem while running the code. When I run this command:sh /home/wenqian/PycharmProjects/QA-FewDet-main/scripts/meta_training_pascalvoc_split1_resnet101.sh The problem is: "RuntimeError: The size of tensor a (4) must match the size of tensor b (7) at non-singleton dimension 3." I tried many methods, but couldn't solve them. How should I solve such a problem?

GuangxingHan commented 1 year ago

Can you show me the full training log so that I can better understand what happened there?

tutu-star commented 1 year ago

Can you show me the full training log so that I can better understand what happened there?

When I run this command:"CUDA_VISIBLE_DEVICES=0 python3 /home/wenqian/PycharmProjects/QA-FewDet-main/fsod_train_net_fewx.py --num-gpus 1 --dist-url auto \ --config-file /home/wenqian/PycharmProjects/QA-FewDet main/configs/fsod/meta_training_pascalvoc_split1_resnet101_stage_1.yaml 2>&1 | tee log/meta_training_pascalvoc_split1_resnet101_stage_1.txt"

The following error will then be reported: ![Uploading image.png…]()

GuangxingHan commented 1 year ago

Sorry, but the image is broken.

tutu-star commented 1 year ago

Sorry, but the image is broken.

Sorry, I will upload it again. 6XYM~K29A{XOW{KZ0WKX2M

GuangxingHan commented 1 year ago

Thanks. It seems the problem is related to this line of code. Could you print and check whether the shape and value of the variables of support_features, and support_bboxes_ls are reasonable?

tutu-star commented 1 year ago

Thanks. It seems the problem is related to this line of code. Could you print and check whether the shape and value of the variables of support_features, and support_bboxes_ls are reasonable?

Thank you. I have printed the features and some of the results are as follows: support_features: image support_bboxes_ls: image

GuangxingHan commented 1 year ago

These values seem to be good. Can you print the shape of x here?