From input to output
The forward pass is the computation that turns an input into a prediction. Data flows through the layers in order, each one transforming the numbers from the layer before it.
- Each layer computes a weighted sum then an activation.
- Outputs of one layer become inputs to the next.
- The final layer produces the prediction.
What happens at each step
A layer takes a vector, multiplies it by its weight matrix, adds a bias vector, and applies its activation. The result is a new vector that represents the input at a higher level of abstraction. Early layers capture simple features and later layers combine them.
Why it is called forward
Information moves in one direction during prediction, from the input toward the output. The backward pass, used only in training, runs the opposite way to assign blame for errors. At inference time only the forward pass runs.
Key idea
The forward pass sends an input through each layer in turn, applying a weighted sum and activation at every step, until the final layer emits a prediction.