From f707b10ef06547b43cb96433f4b4983475425e9d Mon Sep 17 00:00:00 2001 From: AntreasAntoniou Date: Sun, 11 Feb 2018 20:49:40 +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 140515e..9d86344 100644 --- a/cifar100_network_trainer.py +++ b/cifar100_network_trainer.py @@ -160,7 +160,7 @@ with tf.Session() as sess: total_test_accuracy = 0. # computer test loss and accuracy and save with tqdm.tqdm(total=total_test_batches) as pbar_test: - for batch_id, (x_batch, y_batch) in enumerate(test_data): + for batch_idx, (x_batch, y_batch) in enumerate(test_data): c_loss_value, acc = sess.run( [losses_ops["crossentropy_losses"], losses_ops["accuracy"]], feed_dict={dropout_rate: dropout_rate_value, data_inputs: x_batch, diff --git a/cifar10_network_trainer.py b/cifar10_network_trainer.py index 6d4d46a..54f10c1 100644 --- a/cifar10_network_trainer.py +++ b/cifar10_network_trainer.py @@ -160,7 +160,7 @@ with tf.Session() as sess: total_test_accuracy = 0. # computer test loss and accuracy and save with tqdm.tqdm(total=total_test_batches) as pbar_test: - for batch_id, (x_batch, y_batch) in enumerate(test_data): + for batch_idx, (x_batch, y_batch) in enumerate(test_data): c_loss_value, acc = sess.run( [losses_ops["crossentropy_losses"], losses_ops["accuracy"]], feed_dict={dropout_rate: dropout_rate_value, data_inputs: x_batch, diff --git a/emnist_network_trainer.py b/emnist_network_trainer.py index 9f72dad..c175470 100644 --- a/emnist_network_trainer.py +++ b/emnist_network_trainer.py @@ -160,7 +160,7 @@ with tf.Session() as sess: total_test_accuracy = 0. # computer test loss and accuracy and save with tqdm.tqdm(total=total_test_batches) as pbar_test: - for batch_id, (x_batch, y_batch) in enumerate(test_data): + for batch_idx, (x_batch, y_batch) in enumerate(test_data): c_loss_value, acc = sess.run( [losses_ops["crossentropy_losses"], losses_ops["accuracy"]], feed_dict={dropout_rate: dropout_rate_value, data_inputs: x_batch, diff --git a/msd10_network_trainer.py b/msd10_network_trainer.py index 13408e1..57afdae 100644 --- a/msd10_network_trainer.py +++ b/msd10_network_trainer.py @@ -161,7 +161,7 @@ with tf.Session() as sess: total_test_accuracy = 0. # computer test loss and accuracy and save with tqdm.tqdm(total=total_test_batches) as pbar_test: - for batch_id, (x_batch, y_batch) in enumerate(test_data): + for batch_idx, (x_batch, y_batch) in enumerate(test_data): c_loss_value, acc = sess.run( [losses_ops["crossentropy_losses"], losses_ops["accuracy"]], feed_dict={dropout_rate: dropout_rate_value, data_inputs: x_batch, diff --git a/msd25_network_trainer.py b/msd25_network_trainer.py index 202c3e1..81247c6 100644 --- a/msd25_network_trainer.py +++ b/msd25_network_trainer.py @@ -160,7 +160,7 @@ with tf.Session() as sess: total_test_accuracy = 0. # computer test loss and accuracy and save with tqdm.tqdm(total=total_test_batches) as pbar_test: - for batch_id, (x_batch, y_batch) in enumerate(test_data): + for batch_idx, (x_batch, y_batch) in enumerate(test_data): c_loss_value, acc = sess.run( [losses_ops["crossentropy_losses"], losses_ops["accuracy"]], feed_dict={dropout_rate: dropout_rate_value, data_inputs: x_batch,