What Forward Propagation Computes
What you'll learn: How a neural network transforms input data into output predictions by passing information through its layers sequentially.
The Core Idea
Forward propagation is the process by which a neural network computes its output from a given input. Think of it as a conveyor belt in a factory: raw materials (your input data) enter at one end, pass through multiple processing stations (the hidden layers), and emerge as a finished product (the network's prediction) at the other end.
When you feed data into your network, forward propagation performs these calculations:
- Input layer: Receives your raw data (features)
- Hidden layers: Each layer takes the previous layer's output, multiplies it by weights, adds biases, and applies an activation function
- Output layer: Produces the final prediction—class probabilities for classification or a continuous value for regression
The Mathematical Flow
At each layer, forward propagation computes:
- Linear transformation:
z = W · x + b(matrix multiplication of weights with inputs, plus bias) - Nonlinear activation:
a = activation(z)(applying the activation function) - This activated output becomes the input for the next layer
The process repeats layer by layer until you reach the output, which represents the network's prediction given the current weights and biases.
Why This Matters
Forward propagation is what makes prediction possible. Every time you want your trained model to classify an image or predict a price, it performs forward propagation. It's also the first step in training—you need to compute outputs before you can measure how wrong they are and update the weights.
Key Takeaway: Forward propagation computes network outputs by sequentially passing inputs through weighted connections and activation functions, layer by layer, transforming raw data into predictions.