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

RuntimeError:shape does not match when I train Refinedet in both 0.4 branch and master branch #55

Closed
lc17721825 opened this issue Oct 22, 2018 · 5 comments

Comments

@lc17721825
Copy link

Traceback (most recent call last):
File "refinedet_train_test.py", line 448, in
train()
File "refinedet_train_test.py", line 310, in train
arm_loss_l,arm_loss_c = arm_criterion((arm_loc,arm_conf),priors,targets)
File "/home/lc/.local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/lc/git/pytorch_project/PytorchSSD/layers/modules/refine_multibox_loss.py", line 112, in forward
loss_c[pos] = 0 # filter out pos boxes for now
RuntimeError: The shape of the mask [32, 6375] at index 0 does not match the shape of the indexed tensor [204000, 1] at index 0
Exception NameError: "global name 'FileNotFoundError' is not defined" in <bound method _DataLoaderIter.del of <torch.utils.data.dataloader._DataLoaderIter object at 0x7faf15a9bfd0>> ignored

Thanks in advance. @lzx1413

@lc17721825
Copy link
Author

I have solved this problem, you can see the solution in ssd.pytorch in github

@foralliance
Copy link

@lc17721825
能否给出一个链接

@lc17721825
Copy link
Author

amdegroot/ssd.pytorch#173

@lc17721825
Copy link
Author

@foralliance

@foralliance
Copy link

@lc17721825
thks

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