July 2017
Intermediate to advanced
360 pages
8h 26m
English
The option to compute the gradients of all output tensors with respect to any connected input or node is one of the most interesting features of TensorFlow, because it allows us to create learning algorithms without worrying about the complexity of all transformations. In this example, we first define a linear dataset representing the function f(x) = x in the range (-100, 100):
import numpy as np>>> nb_points = 100>>> X = np.linspace(-nb_points, nb_points, 200, dtype=np.float32)
The corresponding plot is shown in the following figure:

Now we want to use TensorFlow to compute:
The first step is defining a graph:
import ...
Read now
Unlock full access