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