MSDN
MSDN copied to clipboard
RuntimeError: Expected object of type torch.cuda.FloatTensor but found type torch.cuda.LongTensor for argument #2 'other'
Hello, yikang-li! when I runing: CUDA_VISIBLE_DEVICES=0 python train_rpn.py,I get this error:
/home/tp/MSDN-master/faster_rcnn/RPN.py:140: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
rpn_cls_prob = F.softmax(rpn_cls_score_reshape)
/home/tp/.local/lib/python2.7/site-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.
warnings.warn(warning.format(ret))
Traceback (most recent call last):
File "train_rpn.py", line 194, in
How do I resolve this error? I use python2.7, cuda9.0 ,pytorch0.4.1