Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -98,7 +98,7 @@ if st.button("Run evolution"):
|
|
98 |
X_train, X_test, y_train, y_test = generate_dataset(task_id)
|
99 |
accuracy = []
|
100 |
for net in ga.population:
|
101 |
-
|
102 |
net.fit(X_train, y_train, epochs=10, verbose=0)
|
103 |
loss, acc = net.evaluate(X_test, y_test, verbose=0)
|
104 |
accuracy.append(acc)
|
|
|
98 |
X_train, X_test, y_train, y_test = generate_dataset(task_id)
|
99 |
accuracy = []
|
100 |
for net in ga.population:
|
101 |
+
net.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
|
102 |
net.fit(X_train, y_train, epochs=10, verbose=0)
|
103 |
loss, acc = net.evaluate(X_test, y_test, verbose=0)
|
104 |
accuracy.append(acc)
|