Skip to main content

Going Through MNIST(Mixed National Institute of Standards and Technology) Datasets in TensorFlow

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... 

Comments


  1. After reading this blog i very strong in this topics and this blog really helpful to all Ruby on Rails Online Course India

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular posts from this blog

Big Oh notation and Algorithmic Complexity analysis

Introduction When executing a particular task using algorithms, one common thing that hits every problem solver brain is the efficient and fast algorithm to solve that problem. But, what do exactly fast and efficient means? Is it the measure of real processing time? No, it's not the measure of real time like second and minutes because the old computer with Pentium processor may take a long time to process the same algorithm than the new Intel i3 processor, or, A bad algorithm written in Assembly may execute faster than a good algorithm written in python. So, run time of program can't be considered to measure algorithmic efficiency.  Hence, to measure the algorithmic efficiency, the concept of Asymptotic Complexity of a program and a notation for describing this called Big Oh  was introduced. Big Oh is the worst case, Big Omega and Big Theta are best and average case notations. Worst case means we are mostly unlucky for that problem domain , i.e precondition of task do

Error during activeadmin gem installation on Rails 5.0 app

Troubleshooting Error with rails activeadmin gem Installation. Ever faced this error below with gem activeadmin installation in rails 5 Your bundle requires gems that depend on each other, creating an infinite loop. Please remove gem 'meta_search' and try again. Include this line in your Gemfile gem 'activeadmin' , github : 'activeadmin' update your bundle doing this. bundle update This error will appear in your console Fetching https://github.com/activeadmin/activeadmin.git Fetching gem metadata from https://rubygems.org/......... Fetching version metadata from https://rubygems.org/.. Fetching dependency metadata from https://rubygems.org/. Resolving dependencies... Bundler could not find compatible versions for gem "actionpack": In Gemfile: activeadmin was resolved to 1.0.0.pre4, which depends on formtastic (~> 3.1) was resolved to 3.1.4, which depends on actionpack (>= 3.2.13)