Skip to content

Commit

Permalink
Fixed 'meta' and 'hyp' may out of order when using evolve (ultralytic…
Browse files Browse the repository at this point in the history
…s#4657)

* Fixed 'meta' and 'hyp' may out of order when using evolve

* Update gitignore
  • Loading branch information
imyhxy committed Sep 5, 2021
1 parent 06521cf commit e80e3d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ sdist/
var/
wheels/
*.egg-info/
wandb/
/wandb/
.installed.cfg
*.egg

Expand Down
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e80e3d7

Please sign in to comment.