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

dimension out of range (expected to be in range of [-1, 0], but got 1) #30

Open
CXY573 opened this issue Oct 14, 2018 · 2 comments
Open

Comments

@CXY573
Copy link

CXY573 commented Oct 14, 2018

Traceback (most recent call last):
File "trainval_net.py", line 330, in
roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/pci/save/Technology/Part-B/FPN/lib/model/fpn/fpn.py", line 187, in forward
rois, rpn_loss_cls, rpn_loss_bbox = self.RCNN_rpn(rpn_feature_maps, im_info, gt_boxes, num_boxes)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/pci/save/Technology/Part-B/FPN/lib/model/rpn/rpn_fpn.py", line 100, in forward
im_info, cfg_key, rpn_shapes))
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/pci/save/Technology/Part-B/FPN/lib/model/rpn/proposal_layer_fpn.py", line 122, in forward
output[i,:num_proposal,1:] = proposals_single
RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

@planckztd
Copy link

the same problem,we need some help @CXY573

@tsoi2
Copy link

tsoi2 commented Nov 15, 2018

same problem, but encountered in
File "/home/tsoikawai/OIC_2018/faster-rcnn.pytorch/lib/model/rpn/proposal_layer.py", line 159
when running 'test_net.py'

I fixed this issue by adding '--cuda' in the command line argument when running 'test_net.py'

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