MNIST

Talking About MNIST(Mixed National Institute of Standards and Technology), It is the larger database of the handwritten digit which is used to train and test various Machine learning and Image processing task. [MNIST Wikipedia entry]

As a beginner to Machine learning and equally beginner to TensorFlow, I have decided to go through the first tutorial entitled MNIST For ML Beginners (Mixed National Institute of Standards and Technology)

[In Tensorflow tutorials, make sure to use the your version of mnist_softmax.py by selecting version in branch section, Do not use master branch because the tutorial will be of different tensorflow version ] for tensorflow 0.11 mnist_softmax.py file]

I started my development environment on Pycharm IDE with interpreter location at virtual environment tensorflow which I created previously during Installation of TensorFlow.

 Going through Tutorials

The data hosted on yann.lecun.com is automatically downloaded and read. This is all that tutorials say.
from tensorflow.examples.tutorials.mnist import input_data
mnist
= input_data.read_data_sets("MNIST_data/", one_hot=True)
Going deeper the above code snippet first line imports the input_data file from /usr/local/lib/python2.7/dit-packages/examples/tutorials/mnist
and the other lines assign the mnist variable to read the data sets

The tensorflow network will use the above-loaded data to train the models we create.

Now creating the models
#Create the Model
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.matmul(x, W) + b
Since The MNIST data has two parts one for image data and another for the label as stated in the TensorFlow tutorials. Label and data are used to feed for models we create.
 To be continued... 

Tags

Tensorflow"  "Artificial Intelligence"  "Machine Learning