From 831b6e39b6ae839037469e7bfd3170e42050fa2c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 12 Jul 2019 17:02:04 +0200 Subject: [PATCH] updates --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 182d7dca..559a8699 100644 --- a/train.py +++ b/train.py @@ -240,7 +240,7 @@ def train( if not (opt.notest or (opt.nosave and epoch < 10)) or epoch == epochs - 1: with torch.no_grad(): results, maps = test.test(cfg, data_cfg, batch_size=batch_size, img_size=opt.img_size, model=model, - conf_thres=0.001) + conf_thres=0.1) # Write epoch results with open('results.txt', 'a') as file: @@ -341,7 +341,7 @@ if __name__ == '__main__': for _ in range(gen): # Get best hyperparameters x = np.loadtxt('evolve.txt', ndmin=2) - fitness = x[:, 2] * 0.9 + x[:, 3] * 0.1 # fitness as weighted combination of mAP and F1 + fitness = x[:, 2] * 0.5 + x[:, 3] * 0.5 # fitness as weighted combination of mAP and F1 x = x[fitness.argmax()] # select best fitness hyps for i, k in enumerate(hyp.keys()): hyp[k] = x[i + 5]