From 6ecd7211c171d11b1d9c292a99dfc7613f5bf303 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 1 Apr 2021 11:16:56 +0200 Subject: [PATCH] fitness reverted to original --- train.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/train.py b/train.py index f865ee6c34ae..4d45c5fca7a4 100644 --- a/train.py +++ b/train.py @@ -405,21 +405,21 @@ def train(hyp, opt, device, tb_writer=None): os.system('gsutil cp %s gs://%s/results/results%s.txt' % (results_file, opt.bucket, opt.name)) # Log - fi = fitness(np.array(results).reshape(1, -1)) # weighted combination of [P, R, mAP@.5, mAP@.5-.95] + # fi = fitness(np.array(results).reshape(1, -1)) # weighted combination of [P, R, mAP@.5, mAP@.5-.95] tags = ['train/box_loss', 'train/obj_loss', 'train/cls_loss', # train loss 'metrics/precision', 'metrics/recall', 'metrics/mAP_0.5', 'metrics/mAP_0.5:0.95', 'val/box_loss', 'val/obj_loss', 'val/cls_loss', # val loss - 'x/lr0', 'x/lr1', 'x/lr2', + 'x/lr0', 'x/lr1', 'x/lr2'] # 'metrics/fitness' - ] # params - for x, tag in zip(list(mloss[:-1]) + list(results) + lr, tags):# + list(fi), tags): + # ] # params + for x, tag in zip(list(mloss[:-1]) + list(results) + lr, tags): # + list(fi), tags): if tb_writer: tb_writer.add_scalar(tag, x, epoch) # tensorboard if wandb_logger.wandb: wandb_logger.log({tag: x}) # W&B # Update best mAP - # fi = fitness(np.array(results).reshape(1, -1)) # weighted combination of [P, R, mAP@.5, mAP@.5-.95] + fi = fitness(np.array(results).reshape(1, -1)) # weighted combination of [P, R, mAP@.5, mAP@.5-.95] if fi > best_fitness: best_fitness = fi wandb_logger.end_epoch(best_result=best_fitness == fi)