In this section, we will provide an overview of the TensorFlow library as well as the structure of a basic TensorFlow application. TensorFlow is an open source library for creating large-scale machine learning applications; it can model computations on a wide variety of hardware, ranging from android devices to heterogeneous multi-gpu systems.
TensorFlow uses a special structure in order to execute code on different devices such as CPUs and GPUs. Computations are defined as a graph and each graph is made up of operations, also known as ops, so whenever we work with TensorFlow, we define the series of operations in a graph.
To run these operations, we need to launch the graph into a session. The session translates the operations and passes them to a device for execution.
For example, the following image represents a graph in TensorFlow. W...