A forward pass propagates input values through a computational graph from inputs to outputs. In a neural network, it produces predictions by applying operations such as matrix multiplication, bias addition, and activation functions. section 2.4.4 section 2.4
A scalar computation graph
Given an input x, weight w, and bias b, compute an intermediate value with x × w, add b, and compare the resulting prediction y with a target using a loss function. Propagating these values to the loss is the forward pass; calculating parameter derivatives afterward is the backward pass. section 2.4.4
A forward pass occupies the prediction stage of a training loop:
- Draw a batch of inputs and corresponding targets. section 2.4
- Run the model on the inputs to obtain predictions. section 2.4 section 2.4.3
- Compute the loss by comparing predictions with targets, then use the backward pass to calculate gradients and update parameters. section 2.4.3
Figure 2.22 Running a forward pass
Use the computation-graph figure to trace values from inputs through intermediate operations to the loss. section 2.4.4







