* [Define the model](#define_the_model).
* Specify additional calculations for each of
the [three different modes](#modes):
- * [Predict](#predict)
- * [Evaluate](#evaluate)
- * [Train](#train)
+ * [Predict](#predict)
+ * [Evaluate](#evaluate)
+ * [Train](#train)
## Define the model
* accuracy: The accuracy is recorded by the following two lines:
- * `eval_metric_ops={'my_accuracy': accuracy})`, during evaluation.
- * `tf.summary.scalar('accuracy', accuracy[1])`, during training.
+ * `eval_metric_ops={'my_accuracy': accuracy})`, during evaluation.
+ * `tf.summary.scalar('accuracy', accuracy[1])`, during training.
These tensorboard graphs are one of the main reasons it's important to pass a
`global_step` to your optimizer's `minimize` method. The model can't record
tensors representing the image data and a label. There are two distinct
ways to create a dataset:
- * Creating a **source** (e.g. `Dataset.from_tensor_slices()`) constructs a
+ * Creating a **source** (e.g. `Dataset.from_tensor_slices()`) constructs a
dataset from
one or more `tf.Tensor` objects.
- * Applying a **transformation** (e.g. `Dataset.batch()`) constructs a dataset
+ * Applying a **transformation** (e.g. `Dataset.batch()`) constructs a dataset
from one or more `tf.data.Dataset` objects.
* A `tf.data.Iterator` provides the main way to extract elements from a
controls the behavior of the session. For example, some of the configuration
options include:
- * `allow_soft_placement`. Set this to `True` to enable a "soft" device
+ * `allow_soft_placement`. Set this to `True` to enable a "soft" device
placement algorithm, which ignores @{tf.device} annotations that attempt
to place CPU-only operations on a GPU device, and places them on the CPU
instead.
- * `cluster_def`. When using distributed TensorFlow, this option allows you
+ * `cluster_def`. When using distributed TensorFlow, this option allows you
to specify what machines to use in the computation, and provide a mapping
between job names, task indices, and network addresses. See
@{tf.train.ClusterSpec.as_cluster_def} for details.
- * `graph_options.optimizer_options`. Provides control over the optimizations
+ * `graph_options.optimizer_options`. Provides control over the optimizations
that TensorFlow performs on your graph before executing it.
- * `gpu_options.allow_growth`. Set this to `True` to change the GPU memory
+ * `gpu_options.allow_growth`. Set this to `True` to change the GPU memory
allocator so that it gradually increases the amount of memory allocated,
rather than allocating most of the memory at startup.