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

indices should be either on cpu or on the same device as the indexed tensor (cpu) #2

Open
dashuaibi122 opened this issue Dec 4, 2023 · 0 comments

Comments

@dashuaibi122
Copy link

哥,请问这个报错咋解决表情包
Traceback (most recent call last):
File "D:\CHENGXUKU\yolov5_obb\train.py", line 633, in
main(opt)
File "D:\CHENGXUKU\yolov5_obb\train.py", line 530, in main
train(opt.hyp, opt, device, callbacks)
File "D:\CHENGXUKU\yolov5_obb\train.py", line 373, in train
compute_loss=compute_loss)
File "D:\anaconda\envs\yolo\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, *kwargs)
File "D:\CHENGXUKU\yolov5_obb\val.py", line 206, in run
out = non_max_suppression_obb(out, conf_thres, iou_thres, labels=lb, multi_label=True, agnostic=single_cls) # list
(n, [xylsθ, conf, cls]) θ ∈ [-pi/2, pi/2)
File "D:\CHENGXUKU\yolov5_obb\utils\general.py", line 854, in non_max_suppression_obb
_, i = obb_nms(rboxes, scores, iou_thres)
File "D:\CHENGXUKU\yolov5_obb\utils\nms_rotated\nms_rotated_wrapper.py", line 37, in obb_nms
ori_inds = ori_inds[~too_small]
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
是在训练时第一轮报错的

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