Graphs and Ops: Blueprint vs. Execution
A computational graph
is a directed acyclic graph (DAG) where nodes are ops
(like MatMul
, Add
, Conv2D
) and edges carry tensors
. In TensorFlow 2, you usually write imperative Python (eager mode), and optionally decorate functions with tf.function
to trace them into graphs for speed.
Think: you sketch a blueprint (graph). The TensorFlow runtime is a construction crew that reads the blueprint and builds results quickly, using all the hardware lanes.