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.

This commit is contained in:
AntreasAntoniou 2018-02-11 20:24:07 +00:00
parent 6a3d271cfd
commit d2cbae927e
5 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)