Skip to content Skip to sidebar Skip to footer

How To Get The Value From Each Output-node During Eval Mnist Testdata In Tensorflow?

I train a convolutional neural network (CNN) with TensorFlow. When the training is finished I calculate the accuracy with the following code: ... correct = tf.equal(tf.argmax(predi

Solution 1:

You can do that by adding the following line:

pred=prediction.eval(feed_dict={ x: testSet[0], y: testSet[1]})

right after

testSet = mnist.test.next_batch(eval_batch_size, shuffle=False)

Then pred will be an array that contains 1 probability vector, and this is the vector you are interested in.

Post a Comment for "How To Get The Value From Each Output-node During Eval Mnist Testdata In Tensorflow?"