diff options
author | nunzip <np.scarh@gmail.com> | 2019-03-04 17:15:50 +0000 |
---|---|---|
committer | nunzip <np.scarh@gmail.com> | 2019-03-04 17:15:50 +0000 |
commit | 02ad81aa8b05c86bf02f1dfb883770af6aa51e61 (patch) | |
tree | efd34459aefc056179d404270fea3e6fb330f9cc | |
parent | 802f52a2410ed20cea55e8c097b3875111a80824 (diff) | |
download | e4-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.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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): |