Sephfox commited on
Commit
c967d7f
1 Parent(s): a9dfca1

Update app.py

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