December 2018
Intermediate to advanced
764 pages
18h 18m
English
One of the popular examples of multiclass classification is to label the images of handwritten digits. The classes or labels in this examples are {0,1,2,3,4,5,6,7,8,9}. In the following example, we will use MNIST. Let's load the MNIST images as we did in the earlier chapter with the following code:
from tensorflow.examples.tutorials.mnist import input_datamnist = input_data.read_data_sets(os.path.join( datasetslib.datasets_root, 'mnist'), one_hot=True)
If the MNIST dataset is already downloaded as per instructions from an earlier chapter, then we would get the following output:
Extracting /Users/armando/datasets/mnist/train-images-idx3-ubyte.gzExtracting /Users/armando/datasets/mnist/train-labels-idx1-ubyte.gzExtracting ...
Read now
Unlock full access