Sephfox commited on
Commit
a592260
1 Parent(s): 56fb854

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,8 +34,8 @@ class GeneticAlgorithm:
34
  self.population = [Net() for _ in range(population_size)]
35
 
36
  def selection(self):
37
- X_train, X_test, y_train, y_test = generate_dataset(self.task_id)
38
- fitness = []
39
  for i, net in enumerate(self.population):
40
  net.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
41
  net.fit(X_train, y_train, epochs=10, verbose=0)
 
34
  self.population = [Net() for _ in range(population_size)]
35
 
36
  def selection(self):
37
+ X_train, X_test, y_train, y_test = generate_dataset(self.task_id)
38
+ fitness = []
39
  for i, net in enumerate(self.population):
40
  net.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
41
  net.fit(X_train, y_train, epochs=10, verbose=0)