Computation graph
A computation graph is a directed graph whose nodes represent computational operations or values and whose edges represent data dependencies between them.
Fast Python: High performance techniques for large datasets
- How it is used
- Uses task graphs to inspect lazy Dask calculations before execution and identify costly distributed operations.
- How deep it goes
- Explains nodes and dependencies through visualized data-frame and array computations, then examines partitioning, reductions, persistence, and task granularity.
- Examples
- Uses a property-tax CSV pipeline, three-partition arithmetic and maximum calculations, and per-pixel versus blockwise Mandelbrot initialization.
- What you can do after
- Apply it via Dask's visualize, persist, compute, and blockwise methods to inspect dependencies and avoid repeated work or excessive tasks.
Read how Fast Python: High performance techniques for large datasets explains computation graph →
Deep Learning with R, Third Edition
A computation graph is a directed representation of operations and their data dependencies used to evaluate computations and derivatives.
- How it is used
- Represents model operations so automatic differentiation can compute gradients for training.
- How deep it goes
- Defines the graph, traces forward and backward passes, and applies it through framework APIs rather than implementing backpropagation from scratch.
- Examples
- Uses a two-layer model, a scalar simplification, a TensorFlow training step, and a PyTorch square-and-backward calculation.
- What you can do after
- Apply it via TensorFlow GradientTape or PyTorch backward() to obtain gradients for model training.
Read how Deep Learning with R, Third Edition explains computation graph →
Deep Learning with Python, Third Edition
A directed acyclic graph that represents a computation as operations and intermediate values, enabling automatic differentiation.
- How it is used
- Represents neural-network calculations as operations so backpropagation can compute gradients.
- How deep it goes
- Defines the graph and works through the chain rule and forward/backward passes, then shows PyTorch gradient use without exposing its tape.
- Examples
- Uses a two-layer loss calculation, a simplified scalar graph, and a PyTorch squared-tensor gradient.
- What you can do after
- Apply it via PyTorch backward() to compute tracked gradients and reset accumulated values when needed.
Read how Deep Learning with Python, Third Edition explains computation graph →
Deep Learning with PyTorch, Second Edition
A graph representation captured from model execution that records operations and data flow.
- How it is used
- Supports gradient calculation during training and represents model operations and data flow for export.
- How deep it goes
- Explains nodes and backward traversal, then shows exported operators; stops short of graph-construction internals.
- Examples
- Uses a parameter-gradient calculation and an exported graph containing linear and ReLU operations.
- What you can do after
- Apply it via PyTorch autograd to calculate gradients, or via torch.export to inspect a traced model.
Read how Deep Learning with PyTorch, Second Edition explains computation graph →
Build a Reasoning Model (From Scratch)
A recorded graph of differentiable operations in PyTorch that enables gradient computation during backpropagation.
- How it is used
- Supports policy optimization by preserving the path from rollout log probabilities to model parameters for a later backward pass.
- How deep it goes
- Defines operation recording and gradient propagation, then stops short of requiring a detailed graph tutorial.
- Examples
- Uses sequence-level log-probability code, SumBackward0 output, and rollout scoring to expose graph participation.
- What you can do after
- Apply it via PyTorch by retaining gradients through sequence scores for policy-training updates.
Read how Build a Reasoning Model (From Scratch) explains computation graph →
Machine Learning Algorithms in Depth
A graph representation in which nodes and edges describe the composition and flow of computations.
- How it is used
- Frames deep learning as stacked computational layers organized for sequential and parallel processing.
- How deep it goes
- Defines depth and breadth and links graphs to backpropagation, but defers detailed treatment of individual computational blocks.
- Examples
- Uses a deep neural network architecture for sentiment analysis as its concrete graph example.
- What you can do after
- Evaluate how deep-learning layers support sequential computation, parallel computation, and parameter refinement.
Read how Machine Learning Algorithms in Depth explains computation graph →
Learn Generative AI with PyTorch
A directed graph of mathematical operations and data flow used to compute gradients in deep learning.
- How it is used
- Supports efficient mathematical computation, backpropagation, and gradient-based training in deep-learning models.
- How deep it goes
- Defines nodes, edges, data flow, and gradient use, but stops short of a worked derivation or implementation walkthrough.
- Examples
- Uses PyTorch's dynamically created graph and its GPU-versus-CPU training context as practical examples.
- What you can do after
- Evaluate how PyTorch represents operations and computes gradients during model training.
Read how Learn Generative AI with PyTorch explains computation graph →
Related concepts
- backpropagationused by · Backpropagation is a procedure for computing derivatives of an output or loss with respect to inputs and parameters by applying the chain rule backward through a computational graph.
- directed graphkind of · A directed graph is a graph whose edges have an orientation from a source vertex to a destination vertex.
- Daskused by · Dask is an open-source Python library for parallel and distributed computing using task graphs and scalable data structures for large or partitioned workloads.
- scheduleruses · A scheduler is a system component that selects, orders, dispatches, or assigns execution resources to tasks according to timing, dependency, placement, or other scheduling criteria.
- directed acyclic graphkind of · A directed acyclic graph is a graph with directed edges and no directed cycles.
- PyTorchuses · PyTorch is an open-source machine-learning framework for Python that provides tensor computation, automatic differentiation, and tools for building and training neural networks.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.






