From d2cbae927e4200790e9813128a376054d0ec3ca1 Mon Sep 17 00:00:00 2001 From: AntreasAntoniou Date: Sun, 11 Feb 2018 20:24:07 +0000 Subject: [PATCH] Fix bug where the test accuracy shown during test computation is computed wrongly. The final test accuracy report is correct however so logged results should be correct. --- cifar100_network_trainer.py | 2 +- cifar10_network_trainer.py | 2 +- emnist_network_trainer.py | 2 +- msd10_network_trainer.py | 2 +- msd25_network_trainer.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cifar100_network_trainer.py b/cifar100_network_trainer.py index 48d8ff8..140515e 100644 --- a/cifar100_network_trainer.py +++ b/cifar100_network_trainer.py @@ -168,7 +168,7 @@ with tf.Session() as sess: total_test_c_loss += c_loss_value total_test_accuracy += acc iter_out = "test_loss: {}, test_accuracy: {}".format(total_test_c_loss / (batch_idx + 1), - acc / (batch_idx + 1)) + total_test_accuracy / (batch_idx + 1)) pbar_test.set_description(iter_out) pbar_test.update(1) diff --git a/cifar10_network_trainer.py b/cifar10_network_trainer.py index 2c5c85d..6d4d46a 100644 --- a/cifar10_network_trainer.py +++ b/cifar10_network_trainer.py @@ -168,7 +168,7 @@ with tf.Session() as sess: total_test_c_loss += c_loss_value total_test_accuracy += acc iter_out = "test_loss: {}, test_accuracy: {}".format(total_test_c_loss / (batch_idx + 1), - acc / (batch_idx + 1)) + total_test_accuracy / (batch_idx + 1)) pbar_test.set_description(iter_out) pbar_test.update(1) diff --git a/emnist_network_trainer.py b/emnist_network_trainer.py index 4a48ecf..9f72dad 100644 --- a/emnist_network_trainer.py +++ b/emnist_network_trainer.py @@ -168,7 +168,7 @@ with tf.Session() as sess: total_test_c_loss += c_loss_value total_test_accuracy += acc iter_out = "test_loss: {}, test_accuracy: {}".format(total_test_c_loss / (batch_idx + 1), - acc / (batch_idx + 1)) + total_test_accuracy / (batch_idx + 1)) pbar_test.set_description(iter_out) pbar_test.update(1) diff --git a/msd10_network_trainer.py b/msd10_network_trainer.py index be86e25..13408e1 100644 --- a/msd10_network_trainer.py +++ b/msd10_network_trainer.py @@ -169,7 +169,7 @@ with tf.Session() as sess: total_test_c_loss += c_loss_value total_test_accuracy += acc iter_out = "test_loss: {}, test_accuracy: {}".format(total_test_c_loss / (batch_idx + 1), - acc / (batch_idx + 1)) + total_test_accuracy / (batch_idx + 1)) pbar_test.set_description(iter_out) pbar_test.update(1) diff --git a/msd25_network_trainer.py b/msd25_network_trainer.py index 2598152..202c3e1 100644 --- a/msd25_network_trainer.py +++ b/msd25_network_trainer.py @@ -168,7 +168,7 @@ with tf.Session() as sess: total_test_c_loss += c_loss_value total_test_accuracy += acc iter_out = "test_loss: {}, test_accuracy: {}".format(total_test_c_loss / (batch_idx + 1), - acc / (batch_idx + 1)) + total_test_accuracy / (batch_idx + 1)) pbar_test.set_description(iter_out) pbar_test.update(1)