Open fglks opened 3 years ago
what should i do to solve it?
do a bit of debugging and check which tensor is causing this error. just take that variable and apply variable_name.numpy() or variable_name.cpu().data.numpy().
I meet the same problem.Do you have some solution to solve it?
@gizem-buss hey, go through the way I wrote, it 'll help
@pkraison I could not find your way. where is the way you mentioned?
I have the same problem, after a bit of debugging I still can't figure it out. Is there a solution to this?
python scripts/train_rpn_3d.py --config=kitti_3d_multi_warmup:
Traceback (most recent call last): File "scripts/train_rpn_3d.py", line 196, in
main(sys.argv[1:])
File "scripts/train_rpn_3d.py", line 125, in main
det_loss, det_stats = criterion_det(cls, prob, bbox_2d, bbox_3d, imobjs, feat_size)
File "/home/user/anaconda3/envs/M3DRPN/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/user/yty/M3D-RPN-master/lib/loss/rpn_3d.py", line 126, in forward
src_anchors = self.anchors[rois[:, 4].type(torch.cuda.LongTensor), :]
File "/home/user/anaconda3/envs/M3DRPN/lib/python3.6/site-packages/torch/tensor.py", line 486, in array
return self.numpy()
TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.