FPN_Pytorch icon indicating copy to clipboard operation
FPN_Pytorch copied to clipboard

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

Open zhiwenhou1227 opened this issue 4 years ago • 0 comments

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

zhiwenhou1227 avatar Jul 28 '20 02:07 zhiwenhou1227