From c10bd5a1cddeba30d7897d625a407c754e3b877d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 20 Jan 2021 18:27:38 -0800 Subject: [PATCH] verbose on final_epoch (#1997) --- test.py | 3 +-- train.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index 1c6ea103489b..2cbbbba5c9a2 100644 --- a/test.py +++ b/test.py @@ -37,7 +37,6 @@ def test(data, plots=True, log_imgs=0, # number of logged images compute_loss=None): - # Initialize/load model and set device training = model is not None if training: # called by train.py @@ -227,7 +226,7 @@ def test(data, print(pf % ('all', seen, nt.sum(), mp, mr, map50, map)) # Print results per class - if (verbose or (nc <= 20 and not training)) and nc > 1 and len(stats): + if (verbose or (nc < 50 and not training)) and nc > 1 and len(stats): for i, c in enumerate(ap_class): print(pf % (names[c], seen, nt[c], p[i], r[i], ap50[i], ap[i])) diff --git a/train.py b/train.py index 83ae7fd92ace..9e6bd8673726 100644 --- a/train.py +++ b/train.py @@ -344,6 +344,7 @@ def train(hyp, opt, device, tb_writer=None, wandb=None): single_cls=opt.single_cls, dataloader=testloader, save_dir=save_dir, + verbose=nc < 50 and final_epoch, plots=plots and final_epoch, log_imgs=opt.log_imgs if wandb else 0, compute_loss=compute_loss)