mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
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
This commit is contained in:
parent
fad57c29cd
commit
f64fab5825
2
.gitignore
vendored
2
.gitignore
vendored
@ -76,7 +76,7 @@ sdist/
|
|||||||
var/
|
var/
|
||||||
wheels/
|
wheels/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
wandb/
|
/wandb/
|
||||||
.installed.cfg
|
.installed.cfg
|
||||||
*.egg
|
*.egg
|
||||||
|
|
||||||
|
2
train.py
2
train.py
@ -570,7 +570,7 @@ def main(opt):
|
|||||||
mp, s = 0.8, 0.2 # mutation probability, sigma
|
mp, s = 0.8, 0.2 # mutation probability, sigma
|
||||||
npr = np.random
|
npr = np.random
|
||||||
npr.seed(int(time.time()))
|
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)
|
ng = len(meta)
|
||||||
v = np.ones(ng)
|
v = np.ones(ng)
|
||||||
while all(v == 1): # mutate until a change occurs (prevent duplicates)
|
while all(v == 1): # mutate until a change occurs (prevent duplicates)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user