From 582becc4bf6ea31618daf4a40260f3c009c96701 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 17 Apr 2019 13:30:28 +0200 Subject: [PATCH] updates --- train.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 0b3eb4e4..5ea0aa16 100644 --- a/train.py +++ b/train.py @@ -178,8 +178,11 @@ def train( print('multi_scale img_size = %g' % dataset.img_size) # Calculate mAP - with torch.no_grad(): - results = test.test(cfg, data_cfg, batch_size=batch_size, img_size=img_size, model=model, conf_thres=0.1) + if opt.nosave and epochs < 10: + results = (0, 0, 0, 0, 0) + else: + with torch.no_grad(): + results = test.test(cfg, data_cfg, batch_size=batch_size, img_size=img_size, model=model, conf_thres=0.1) # Write epoch results with open('results.txt', 'a') as file: