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

Error using resnet50-fpn backbone #17

Open
Mansoor-at opened this issue Mar 8, 2022 · 2 comments
Open

Error using resnet50-fpn backbone #17

Mansoor-at opened this issue Mar 8, 2022 · 2 comments

Comments

@Mansoor-at
Copy link

Hi
I am getting following error if i use resnet50-fpn backbone. mobilenet just works fine. Could you help me.

Traceback (most recent call last):
File "/Users/Mansoor/PycharmProjects/pythonProject/train.py", line 131, in
main()
File "/Users/Mansoor/PycharmProjects/pythonProject/train.py", line 83, in main
print_freq=50, warmup=False)
File "/Users/Mansoor/PycharmProjects/pythonProject/utils/train_utils.py", line 373, in train_one_epoch
loss_dict = model(images, targets)
File "/Users/Mansoor/opt/anaconda3/envs/pythonProject/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/Users/Mansoor/PycharmProjects/pythonProject/utils/faster_rcnn_utils.py", line 85, in forward
proposals, proposal_losses = self.rpn(images, features, targets)
File "/Users/Mansoor/opt/anaconda3/envs/pythonProject/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/Users/Mansoor/PycharmProjects/pythonProject/utils/rpn_utils.py", line 290, in forward
proposals = self.box_coder.decode(pred_bbox_deltas.detach(), anchors)
File "/Users/Mansoor/PycharmProjects/pythonProject/utils/det_utils.py", line 182, in decode
rel_codes.reshape(box_sum, -1), concat_boxes
RuntimeError: shape '[96768, -1]' is invalid for input of size 392832

@Ayu000
Copy link

Ayu000 commented Apr 29, 2022

I changed anchor_size from [64, 128, 256] to [32, 64, 128, 256, 512] in train_config.py

@TrinhThiBaoAnh
Copy link

I changed anchor_size from [64, 128, 256] to [32, 64, 128, 256, 512] in train_config.py

Thanks so much! But i still don't understand the reason for this! Can you explain more ?

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

3 participants