ML puzzle: bad mnist data shape

After I figured out that the links weren’t much help, and I found https://www.tensorflow.org/versions/r1.1/get_started/mnist/beginners I tried inserting their code. I can run it on my computer just fine, but on CG it fails with a weird error…

ValueError: Cannot feed value of shape (1000, 28, 28, 1) for Tensor u'Placeholder_1:0', which has shape '(?, 10)'

which is triggered by the line

print >> sys.stderr, accuracy.eval(feed_dict={x: mnist.test.images, y_: mnist.test.labels})

So I added a check

print >> sys.stderr, mnist.test.labels.shape

which shows

(1000, 28, 28, 1)

Why are the mnist test labels shaped like unflattened images?