tensorflow-mnist-cnn icon indicating copy to clipboard operation
tensorflow-mnist-cnn copied to clipboard

mnist_cnn_train.py test accuracy values off

Open jasonkpratt opened this issue 7 years ago • 0 comments

When the model is created "y = cnn_model.CNN(x) ", the is_training variable is not passed. Thus in the testing section when performing y_final = sess.run(y, feed_dict={x: batch_xs, y_: batch_ys, is_training: False}), the is_training: False has no affect. This will impact your accuracy.

If you use the mnist_cnn_train.py test function, the model is initialized with the is_training parameter and will give a result of approximately .5 % higher.

I changed y = cnn_model.CNN(x, is_training=is_training) and now the accuracy percents match for both modules.

Just as a side note: tf.scalar_summar is deprecated in Tensor 1.4

jasonkpratt avatar Jan 21 '18 03:01 jasonkpratt