Fix TypeError: 'PosixPath' object is not iterable (#3285)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-05-21 23:35:31 +02:00
1 parent 683cefead4
commit dd7f0b7e05
1 file changed
+1 -1
+1 -1
View File
@@ -419,7 +419,7 @@ def train(hyp, opt, device, tb_writer=None):
# Test best.pt
logger.info('%g epochs completed in %.3f hours.\n' % (epoch - start_epoch + 1, (time.time() - t0) / 3600))
if opt.data.endswith('coco.yaml') and nc == 80: # if COCO
for m in (last, best) if best.exists() else (last): # speed, mAP tests
for m in [last, best] if best.exists() else [last]: # speed, mAP tests
results, _, _ = test.test(opt.data,
batch_size=batch_size * 2,
imgsz=imgsz_test,