This commit is contained in:
Glenn Jocher 2019-04-17 17:41:05 +02:00
parent c2809622c1
commit 4107315afe
1 changed files with 1 additions and 2 deletions

View File

@ -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)