Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,8 +35,8 @@ class GeneticAlgorithm:
|
|
35 |
self.population = [Net() for _ in range(population_size)]
|
36 |
|
37 |
def selection(self):
|
38 |
-
|
39 |
-
|
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)
|