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

index(): argument 'indices' (position 1) must be tuple of Tensors, not Tensor #12

Open
zhiwenhou1227 opened this issue Jul 28, 2020 · 0 comments

Comments

@zhiwenhou1227
Copy link

when i run trainval_net.py in python 3.6, pytorch 0.4.0,i meet this error ,how can i solve it,than you!
Traceback (most recent call last):
File "/FPN_Pytorch-master/trainval_net.py", line 366, in
roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/FPN_Pytorch-master/lib/model/fpn/fpn.py", line 195, in forward
roi_data = self.RCNN_proposal_target(rois, gt_boxes, num_boxes)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/FPN_Pytorch-master/lib/model/rpn/proposal_target_layer.py", line 52, in forward
rois_per_image, self._num_classes)
File "/FPN_Pytorch-master/lib/model/rpn/proposal_target_layer.py", line 133, in _sample_rois_pytorch
labels = gt_boxes[:,:,4].contiguous().view(-1).index(offset.view(-1))
TypeError: index(): argument 'indices' (position 1) must be tuple of Tensors, not Tensor

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

1 participant