Computational graph

A computational graph is a series of TensorFlow operations, also known as ops, arranged into a graph of nodes. The following two principle steps are used by TensorFlow Core:

  1. Define a computational graph
  2. Run the computational graph

Let's try to understand this concept with a very simple example. Let's say that you have a function with two variables, x and y as shown in the following screenshot:

We will use the preceding formula to calculate or to build a computational graph for the actual value of this function when you pass the values 3 and 2 for x and y respectively:

Now, let's build a computational graph for actually ...

Get Mastering Predictive Analytics with scikit-learn and TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.