Skip to content

Commit

Permalink
Fix TypeError: 'PosixPath' object is not iterable (ultralytics#3285)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored May 21, 2021
1 parent e1479ab commit 7cef202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7cef202

Please sign in to comment.