February 2018
Intermediate to advanced
450 pages
11h 27m
English
In this section, we'll kick off the training process. We'll use the helper function of the mnist_dataset object in order to get a random batch from the dataset with a specific size; then we'll run the optimizer on this batch of images.
Let's start this section by creating the session variable, which will be responsible for executing the computational graph that we defined earlier:
# creating the session sess = tf.Session()
Next up, let's kick off the training process:
num_epochs = 20train_batch_size = 200sess.run(tf.global_variables_initializer())for e in range(num_epochs): for ii in range(mnist_dataset.train.num_examples//train_batch_size): input_batch = mnist_dataset.train.next_batch(train_batch_size) feed_dict = {inputs_values: ...Read now
Unlock full access