updates
This commit is contained in:
parent
eeb4cbc5c1
commit
db49211d70
3
train.py
3
train.py
|
@ -429,9 +429,8 @@ if __name__ == '__main__':
|
|||
if os.path.exists('evolve.txt'): # if evolve.txt exists: select best hyps and mutate
|
||||
# Select parent(s)
|
||||
x = np.loadtxt('evolve.txt', ndmin=2)
|
||||
if len(x) > 1:
|
||||
parent = 'weighted' # parent selection method: 'single' or 'weighted'
|
||||
if parent == 'single':
|
||||
if parent == 'single' or len(x) == 1:
|
||||
x = x[fitness(x).argmax()]
|
||||
elif parent == 'weighted': # weighted combination
|
||||
n = min(10, x.shape[0]) # number to merge
|
||||
|
|
Loading…
Reference in New Issue