ML Puzzle: tf error when try correct_prediction example

the tutorial page shows this to compute the accuracy myself:
correct_prediction = tf.equal(tf.argmax(y,1), tf.argmax(y_,1))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
print(sess.run(accuracy, feed_dict={x: mnist.test.images, y_: mnist.test.labels}))

however this gives me the error:
ValueError: Cannot feed value of shape (1000, 28, 28, 1) for Tensor u’Placeholder_1:0’, which has shape (Dimension(None), Dimension(10))
at session.py. in run on line 345
at Answer.py. in <module> on line 43

Note that if I remove these lines my program works fine as a copy from the tutorial

Hi, I have encountered the same issue. When I comment this lines, test results are only 9-10% good. I think its simply random result. Have you solve it?

EDIT:
Commenting line
print ' '.join(map(str, [random.randint(0,9) for _ in range(len(mnist.validation.images))]))
It solved my problem, accuracy rose up to 92%. I thought the problem was caused by anything but that. :dizzy_face: