Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jul 12, 2019
1 parent 03c6fe1 commit 831b6e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -341,7 +341,7 @@ def print_mutation(hyp, results):
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]
Expand Down

0 comments on commit 831b6e3

Please sign in to comment.