From dd7f0b7e05e7658e9cd4fc8f02de5b7df060785d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 21 May 2021 23:35:31 +0200 Subject: [PATCH] Fix TypeError: 'PosixPath' object is not iterable (#3285) --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 3aad065b8f1b..a3ae79a6cee7 100644 --- a/train.py +++ b/train.py @@ -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,