You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "train.py", line 633, in
main(opt)
File "train.py", line 530, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 326, in train
loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size
File "/home/lzh/yolov5_obb/utils/loss.py", line 136, in call
tcls, tbox, indices, anchors, tgaussian_theta = self.build_targets(p, targets) # targets
File "/home/lzh/yolov5_obb/utils/loss.py", line 268, in build_targets
indices.append((b, a, gj.clamp_(0, feature_wh[1] - 1), gi.clamp_(0, feature_wh[0] - 1))) # image, anchor, grid indices
RuntimeError: result type Float can't be cast to the desired output type long int
how can i revise the code
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "train.py", line 633, in
main(opt)
File "train.py", line 530, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 326, in train
loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size
File "/home/lzh/yolov5_obb/utils/loss.py", line 136, in call
tcls, tbox, indices, anchors, tgaussian_theta = self.build_targets(p, targets) # targets
File "/home/lzh/yolov5_obb/utils/loss.py", line 268, in build_targets
indices.append((b, a, gj.clamp_(0, feature_wh[1] - 1), gi.clamp_(0, feature_wh[0] - 1))) # image, anchor, grid indices
RuntimeError: result type Float can't be cast to the desired output type long int
how can i revise the code
The text was updated successfully, but these errors were encountered: