大佬,在添加OTA中,拉的版本是yolov5 7.0 按照视频步骤,还是有如下问题
Traceback (most recent call last):
File "/home//yolov5/train.py", line 634, in
main(opt)
File "/home//yolov5/train.py", line 528, in main
train(opt.hyp, opt, device, callbacks)
File "/home//yolov5/train.py", line 310, in train
loss, loss_items = compute_loss(pred, targets.to(device),imgs) # loss scaled by batch_size
File "/home//yolov5/utils/loss.py", line 300, in call
tobj[b, a, gj, gi] = (1.0 - self.gr) + self.gr * iou.detach().clamp(0).type(tobj.dtype) # iou ratio
RuntimeError: shape mismatch: value tensor of shape [41, 1] cannot be broadcast to indexing result of shape [41]
大佬,在添加OTA中,拉的版本是yolov5 7.0 按照视频步骤,还是有如下问题 Traceback (most recent call last): File "/home//yolov5/train.py", line 634, in
main(opt)
File "/home//yolov5/train.py", line 528, in main
train(opt.hyp, opt, device, callbacks)
File "/home//yolov5/train.py", line 310, in train
loss, loss_items = compute_loss(pred, targets.to(device),imgs) # loss scaled by batch_size
File "/home//yolov5/utils/loss.py", line 300, in call
tobj[b, a, gj, gi] = (1.0 - self.gr) + self.gr * iou.detach().clamp(0).type(tobj.dtype) # iou ratio
RuntimeError: shape mismatch: value tensor of shape [41, 1] cannot be broadcast to indexing result of shape [41]