aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornunzip <np.scarh@gmail.com>2019-03-04 17:15:50 +0000
committernunzip <np.scarh@gmail.com>2019-03-04 17:15:50 +0000
commit02ad81aa8b05c86bf02f1dfb883770af6aa51e61 (patch)
treeefd34459aefc056179d404270fea3e6fb330f9cc
parent802f52a2410ed20cea55e8c097b3875111a80824 (diff)
downloade4-gan-02ad81aa8b05c86bf02f1dfb883770af6aa51e61.tar.gz
e4-gan-02ad81aa8b05c86bf02f1dfb883770af6aa51e61.tar.bz2
e4-gan-02ad81aa8b05c86bf02f1dfb883770af6aa51e61.zip
make test_classifier return the score rather than printing it
-rw-r--r--lenet.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lenet.py b/lenet.py
index a38f4e1..c1c27b5 100644
--- a/lenet.py
+++ b/lenet.py
@@ -125,8 +125,8 @@ def test_classifier(model, x_test, y_true):
y_pred = model.predict(x_test)
y_pred = np.argmax(y_pred, axis=1)
y_true = np.argmax(y_true, axis=1)
- print("Test acc:", accuracy_score(y_true, y_pred))
plot_example_errors(y_pred, y_true, x_test)
+ return accuracy_score(y_true, y_pred)
def mix_data(X_train, y_train, X_validation, y_validation, train_gen, tr_labels_gen, val_gen, val_labels_gen, split=0):