<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 MNIST data set image classification using Tensor Flow
The MNIST image data set is a typical image classifcation example for ML 
Algorithms Used
Step1:  x is a placeholder, a value that we'll input when we ask TensorFlow to run a computation. We want to be able to input any number of MNIST images, each flattened into a 784-dimensional vector. We represent this as a 2-D tensor of floating-point numbers, with a shape [None, 784]. (Here None means that a dimension can be of any length)
Step2:  Execution of the Model in Session
Step3:  Evaluating the model
<ASSISTANT_TASK:>
Python Code:
# Importing tensorflow lib
import tensorflow as tf
tf.__version__ #Checking if notebook is working in tensorflow
# Reading the dataset from Yann LeCun's Website: http://yann.lecun.com/exdb/mnist/
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
x = tf.placeholder(tf.float32, [None, 784])
Explanation: MNIST data set image classification using Tensor Flow
The MNIST image data set is a typical image classifcation example for ML 
Algorithms Used: Softmax Regression; TensorFlow/Neural Network
Based on: https://www.tensorflow.org/get_started/mnist/beginners
Author: Rishu Shrivastava
Date: Dec 24, 2017
End of explanation
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
# Implement Softmax Regression
y = tf.nn.softmax(tf.matmul(x, W) + b)
# Implementing Cross entropy to calculate the loss/error
y_ = tf.placeholder(tf.float32, [None, 10]) # a placeholder to input the correct answers
cross_entropy = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y), reduction_indices=[1]))
train_step = tf.train.GradientDescentOptimizer(0.5).minimize(cross_entropy) # Learning rate = 0.5
Explanation: x is a placeholder, a value that we'll input when we ask TensorFlow to run a computation. We want to be able to input any number of MNIST images, each flattened into a 784-dimensional vector. We represent this as a 2-D tensor of floating-point numbers, with a shape [None, 784]. (Here None means that a dimension can be of any length)
End of explanation
sess = tf.InteractiveSession()
tf.global_variables_initializer().run()
for _ in range(1000):
  batch_xs, batch_ys = mnist.train.next_batch(100)
  sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys})
Explanation: Execution of the Model in Session
End of explanation
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}))
mnist.test.images
Explanation: Evaluating the model
End of explanation
<END_TASK>