November 2017
Intermediate to advanced
304 pages
6h 58m
English
It will be more fulfilling, however, to see our training in action and how we will improve upon what we did earlier.
We will prepare the training dataset and labels as follows:
tf_train_dataset = tf.placeholder(tf.float32,
shape=(batch_size, image_size, image_size, num_channels), name='TRAIN_DATASET') tf_train_labels = tf.placeholder(tf.float32, shape=(batch_size, num_of_classes), name='TRAIN_LABEL')
tf_valid_dataset = tf.constant(dataset.valid_dataset, name='VALID_DATASET')
tf_test_dataset = tf.constant(dataset.test_dataset, name='TEST_DATASET')
Then, we will run the trainer, as follows:
# Training computation.
logits = nn_model(tf_train_dataset, weights, biases, True) loss = tf.reduce_mean( tf.nn.softmax_cross_entropy_with_logits(logits, ...Read now
Unlock full access