Epoch gpu_mem box obj cls labels img_size 0%| | 0/1 [00:01 main(opt) File "/home/data/yolov5-6.1/train.py", line 539, in main train(opt.hyp, opt, device, callbacks) File "/home/data/yolov5-6.1/train.py", line 331, in train loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size File "/home/data/yolov5-6.1/utils/loss.py", line 120, in __call__ tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets File "/home/data/yolov5-6.1/utils/loss.py", line 217, in build_targets indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices RuntimeError: result type Float can't be cast to the desired output type long int 处理方式:
标签:loss,py,Float,6.1,home,type,targets From: https://www.cnblogs.com/sinxsoft/p/17210946.html