ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more


A TensorFlow computation, represented as a dataflow graph.

Used in the notebooks

Used in the guide Used in the tutorials

Graphs are used by tf.functions to represent the function's computations. Each graph contains a set of tf.Operation objects, which represent units of computation; and tf.Tensor objects, which represent the units of data that flow between operations.

Using graphs directly (deprecated)

A tf.Graph can be constructed and used directly without a tf.function, as was required in TensorFlow 1, but this is deprecated and it is recommended to use a