From 4107315afe8cb7d35f5ee1c132967e70792619b1 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 17 Apr 2019 17:41:05 +0200 Subject: [PATCH] updates --- train.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/train.py b/train.py index b5410b46..c0c0aacf 100644 --- a/train.py +++ b/train.py @@ -199,8 +199,7 @@ def train( print('multi_scale img_size = %g' % dataset.img_size) # Calculate mAP - opt.notest = opt.notest or (opt.nosave and epoch < 10) # skip testing first 10 epochs if opt.nosave - if not opt.notest or epoch == epochs - 1: # always test final epoch + if not (opt.notest or (opt.nosave and epoch < 2)) or epoch == epochs - 1: # always test final epoch with torch.no_grad(): results = test.test(cfg, data_cfg, batch_size=batch_size, img_size=img_size, model=model, conf_thres=0.1)