Skip to content

Commit c10bd5a

Browse files
authored
verbose on final_epoch (ultralytics#1997)
1 parent d2aa638 commit c10bd5a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def test(data,
3737
plots=True,
3838
log_imgs=0, # number of logged images
3939
compute_loss=None):
40-
4140
# Initialize/load model and set device
4241
training = model is not None
4342
if training: # called by train.py
@@ -227,7 +226,7 @@ def test(data,
227226
print(pf % ('all', seen, nt.sum(), mp, mr, map50, map))
228227

229228
# Print results per class
230-
if (verbose or (nc <= 20 and not training)) and nc > 1 and len(stats):
229+
if (verbose or (nc < 50 and not training)) and nc > 1 and len(stats):
231230
for i, c in enumerate(ap_class):
232231
print(pf % (names[c], seen, nt[c], p[i], r[i], ap50[i], ap[i]))
233232

train.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
344344
single_cls=opt.single_cls,
345345
dataloader=testloader,
346346
save_dir=save_dir,
347+
verbose=nc < 50 and final_epoch,
347348
plots=plots and final_epoch,
348349
log_imgs=opt.log_imgs if wandb else 0,
349350
compute_loss=compute_loss)

0 commit comments

Comments
 (0)