TensorFlow - Show image from MNIST DataSet
<p>I'm trying to learn TensorFlow and I implemented the MNIST example from the the following link: <a href="http://openmachin.es/blog/tensorflow-mnist" rel="noreferrer">http://openmachin.es/blog/tensorflow-mnist</a>
I want to be able to actually view the training/test images.
So I'm trying to add code that will show the first train picture of the first batch:</p>

<pre><code>x_i = batch_xs[0]
image = tf.reshape(x_i,[28,28])
</code></pre>

<p>Now, because the Data is in float32 type (with values in [0,1] range), I tried to convert it to uint16 and then to encode it to png in order to show the image.
I tried using <code>tf.image.convert_image_dtype and tf.image.encode_png</code>, but with no success.
Can you guys please help me understand how can I convert the raw Data to an image and show the image?</p>