January 2018
Beginner to intermediate
284 pages
8h 35m
English
In this section, we will show how to implement a CNN to recognize 10 class handwritten digits using TensorFlow. We will use the MNIST dataset for this challenge, which consists of 60,000 training examples and 10,000 test examples of the handwritten digits zero to nine, where each image is a 28 x 28-pixel monochrome image.
Let us assume all features are present in the features variable and labels in the labels variable. We begin with importing the necessary packages and adding the input layer from the pre-loaded features variable:
import numpy as npimport tensorflow as tf# import mnistmnist = tf.contrib.learn.datasets.load_dataset("mnist")features = mnist.train.images # Returns np.array# Input Layer ...Read now
Unlock full access