May 2018
Beginner
490 pages
13h 16m
English
This program is a unit-testing model. It uses unit-testing data in a unit-testing deep learning model:
mnist = input_data.read_data_sets(FLAGS.data_dir,one_hot=True,fake_data=FLAGS.fake_data)
fake_data refers to an MNIST (handwritten digits) unit testing dataset and FLAGS are command-line parameters (in this case, path information).
one-hot=true means that the labels of the data must be encoded into values. The presence of labels means that this is a supervised (with labels) training classifier and not an unsupervised (training with no labels) classifier.
The one-hot function (see Chapter 2, Think like a Machine) will encode labels into distinct one-hot values as in the following example:
# [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0], # [0, ...
Read now
Unlock full access