yolov5 跑gpu遇到问题

Epoch gpu_mem box obj cls total labels img_size
0%| | 0/169 [00:02<?, ?it/s]
Traceback (most recent call last):
File "D:/yolov5-5.0/train.py", line 543, in
train(hyp, opt, device, tb_writer)
File "D:/yolov5-5.0/train.py", line 304, in train
loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size
File "D:\yolov5-5.0\utils\loss.py", line 117, in call
tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets
TypeError: cannot unpack non-iterable NoneType object

img


img

更新下你的代码,旧版本的代码找不到sppf这个模块