What Is Forward Propagation?
Forward propagation is the process of passing input data through a neural network from the input layer to the output layer to produce a prediction.
In simple words
Forward propagation means: take the input, pass it through the neural network layer by layer, and get an output.
How Forward Propagation Works
During forward propagation, information moves in one direction:
The network starts with the input data and continues calculating values until it reaches the output.
Simple Example — Predicting a Student's Result
Imagine we want a neural network to predict whether a student will pass an exam.
We give the network two inputs:
Study Hours = 5
Attendance = 90
These values enter the neural network.
The network processes these values through its layers and eventually produces an output.
Prediction = 0.87
If the output represents the probability of passing, this could be interpreted as approximately an 87% predicted probability of passing, assuming the model is designed and calibrated that way.
Why Is It Called "Forward" Propagation?
It is called forward propagation because information moves forward through the network.
Input
↓
Hidden Layer 1
↓
Hidden Layer 2
↓
Output Layer
↓
Prediction
The data does not move backward during this process.
The backward process is called backpropagation, which is used later to calculate gradients and update the model's weights.
What Happens Inside the Network?
A neural network does not simply copy the input to the output. Each neuron performs calculations.
A simplified neuron calculation is:
z = (input × weight) + bias
Then an activation function is applied:
output = activation(z)
You already learned about activation functions in the previous lesson.
A Simple Neuron Calculation
Suppose a neuron receives:
Input = 2
Weight = 0.5
Bias = 1
First calculate the weighted input:
z = (2 × 0.5) + 1
z = 1 + 1
z = 2
Now suppose the neuron uses ReLU.
ReLU(2) = 2
Therefore, this neuron produces:
Output = 2
Forward Propagation Through Multiple Layers
Real neural networks usually contain many neurons and multiple layers.
The output from one layer becomes the input to the next layer.
Input Layer
↓
Calculate Hidden Layer
↓
Apply Activation Function
↓
Hidden Layer Output
↓
Calculate Next Layer
↓
Apply Activation Function
↓
Output Layer
↓
Prediction
This process continues until the network reaches the final output layer.
Simple Two-Layer Example
Imagine a very small neural network:
Input
↓
Hidden Layer
↓
Output Layer
Suppose the input is:
x = 2
The hidden neuron calculates:
z = (2 × 0.5) + 1
z = 2
Apply ReLU:
hidden_output = ReLU(2)
hidden_output = 2
Now this hidden output becomes the input to the output neuron.
output_z = (2 × 0.8) + 0.2
output_z = 1.8
If the output layer uses Sigmoid:
Sigmoid(1.8) ≈ 0.858
So the final prediction is approximately:
Prediction ≈ 0.858
Complete Forward Pass
This entire process is what we call a forward pass.
When the network performs this process for an input, we say that it is performing forward propagation.
Forward Propagation vs Training
Do not confuse forward propagation with the entire training process.
Forward propagation produces the model's prediction.
Input
↓
Forward Propagation
↓
Prediction
↓
Loss
During training, the loss is then used as part of the process that calculates gradients and updates weights.
Prediction
↓
Loss
↓
Backpropagation
↓
Gradients
↓
Update Weights
You will learn the backward process in the Backpropagation lesson.
Example — Cat or Dog?
Suppose we build a neural network that classifies an image as either a cat or a dog.
The image pixels enter the network:
Image
↓
Input Layer
↓
Hidden Layers
↓
Output Layer
↓
Prediction
Suppose the output is:
Cat = 0.91
Dog = 0.09
The model would choose the class with the higher predicted probability:
Prediction = Cat
The calculation that produced those values is part of forward propagation.
Important Distinction
Forward propagation answers: "What does the model predict for this input?"
Backpropagation answers: "How should the model's parameters change to reduce the error?"
The Big Picture
Input Data
↓
Input Layer
↓
Weighted Calculation
↓
Bias
↓
Activation Function
↓
Hidden Layer
↓
Weighted Calculation
↓
Bias
↓
Activation Function
↓
Output Layer
↓
Prediction
The key idea is that the information moves from the beginning of the network to the end.
What You Should Remember
Forward propagation is the process of passing input data through a neural network to produce an output.
Input
↓
Hidden Layers
↓
Output
↓
Prediction
Each neuron uses weights, bias, and an activation function to calculate its output.
Check Your Understanding
What is forward propagation?
Passing input data through the neural network from
the input layer to the output layer.
Which direction does information move?
Forward, from input toward output.
What does a neuron use to calculate its output?
Inputs, weights, bias, and an activation function.
Does forward propagation update the weights?
No. Forward propagation calculates the prediction.
Weight updates happen during the training process
using gradients and backpropagation.
What is the final result of forward propagation?
The network's output or prediction.