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

Why do dimensions not match? #8

Open
tutu-star opened this issue Mar 26, 2023 · 7 comments
Open

Why do dimensions not match? #8

tutu-star opened this issue Mar 26, 2023 · 7 comments

Comments

@tutu-star
Copy link

tutu-star commented Mar 26, 2023

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
Copy link
Owner

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

@tutu-star
Copy link
Author

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
Copy link
Owner

Sorry, but the image is broken.

@tutu-star
Copy link
Author

Sorry, but the image is broken.

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

@GuangxingHan
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

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

2 participants