Importing the MNIST dataset

The MNSIT dataset is a database of handwritten digits, and contains 60,000 training examples and 10,000 testing examples:

from tensorflow.examples.tutorials.mnist import input_data

mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)

We will load the image database from MNIST:

import matplotlib.pyplot as plt 

im = mnist.train.images[0,:]

label = mnist.train.labels[0,:]

im = im.reshape([28,28])

We can construct a fully connected feed-forward neural network that is one layer deep to complete the example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset