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

Error occurs when training multiple classes #6

Open
bw9623 opened this issue Jul 28, 2022 · 0 comments
Open

Error occurs when training multiple classes #6

bw9623 opened this issue Jul 28, 2022 · 0 comments

Comments

@bw9623
Copy link

bw9623 commented Jul 28, 2022

Hello, I understand that the angle of the project is basically set from 0 to 90, and we have modified it to 0 to 360 and have used it well when the class num is 1 However, if the class num is more than 2, the following error occurs Do you know anything?
Thank you.

Traceback (most recent call last):
File "./yolov5/train.py", line 600, in
main(opt)
File "./yolov5/train.py", line 498, in main
train(opt.hyp, opt, device)
File "./yolov5/train.py", line 363, in train
compute_loss=compute_loss)
File "/home/training1/anaconda3/envs/cube/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
return func(*args, **kwargs)
File "/home/training1/cube_detector/yolov5/val.py", line 211, in run
out = non_max_suppression(out, conf_thres, iou_thres, labels=lb, multi_label=True, agnostic=single_cls)
File "/home/training1/cube_detector/yolov5/utils/general.py", line 565, in non_max_suppression
conf_angle, j_angle = x[i, 5+nc:].max(1, keepdim=True)
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

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