Sephfox commited on
Commit
2537fdd
·
verified ·
1 Parent(s): 32d3e1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -67,8 +67,8 @@ class GeneticAlgorithm:
67
  self.population += offspring
68
 
69
  # Get the weights of the parent networks
70
- parent1_weights = parent1.get_weights()
71
- parent2_weights = parent2.get_weights()
72
  # Average the weights of the two parents
73
  child_weights = [(np.array(w1) + np.array(w2)) / 2 for w1, w2 in zip(parent1_weights, parent2_weights)]
74
  child.set_weights(child_weights)
 
67
  self.population += offspring
68
 
69
  # Get the weights of the parent networks
70
+ parent1_weights = parent1.get_weights()
71
+ parent2_weights = parent2.get_weights()
72
  # Average the weights of the two parents
73
  child_weights = [(np.array(w1) + np.array(w2)) / 2 for w1, w2 in zip(parent1_weights, parent2_weights)]
74
  child.set_weights(child_weights)