O'Reilly logo

Mastering Predictive Analytics with scikit-learn and TensorFlow by Alan Fontaine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required