Browse Source

verbose on final_epoch (#1997)

5.0
Glenn Jocher GitHub 3 years ago
parent
commit
046c37e465
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions
  1. +1
    -2
      test.py
  2. +1
    -0
      train.py

+ 1
- 2
test.py View File

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


+ 1
- 0
train.py View File

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

Loading…
Cancel
Save