From e80e3d7e075db33724cc76bcf1b156cc7596fe6f Mon Sep 17 00:00:00 2001 From: imyhxy Date: Sun, 5 Sep 2021 23:43:09 +0800 Subject: [PATCH] Fixed 'meta' and 'hyp' may out of order when using evolve (#4657) * Fixed 'meta' and 'hyp' may out of order when using evolve * Update gitignore --- .gitignore | 2 +- train.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e5d02af960af..9c270c7dabe7 100755 --- a/.gitignore +++ b/.gitignore @@ -76,7 +76,7 @@ sdist/ var/ wheels/ *.egg-info/ -wandb/ +/wandb/ .installed.cfg *.egg diff --git a/train.py b/train.py index 36492edb8f0b..89f86401c187 100644 --- a/train.py +++ b/train.py @@ -570,7 +570,7 @@ def main(opt): mp, s = 0.8, 0.2 # mutation probability, sigma npr = np.random npr.seed(int(time.time())) - g = np.array([x[0] for x in meta.values()]) # gains 0-1 + g = np.array([meta[k][0] for k in hyp.keys()]) # gains 0-1 ng = len(meta) v = np.ones(ng) while all(v == 1): # mutate until a change occurs (prevent duplicates)