Lensa ML
Lensa ML

How Forward Propagation Works

Step 1 of 6

Raw Features Go In

The network sees numbers, not pictures — each feature is a measurement

A cat image enters the network
👂
Pointy ears
0.85
normalized 0–1
〰️
Whiskers
0.72
normalized 0–1
🐾
Fur texture
0.91
normalized 0–1

The network doesn't see a photo — it sees numbers. Each feature is a measurement scaled to 0–1. High values mean "strongly present." These numbers are the only thing the network has to work with.

① Measure features
② Normalize to 0–1
③ Feed into layer 1

Step 1 of 6: Raw Features Go In

The network sees numbers, not pictures — each feature is a measurement

A cat image enters the network
👂
Pointy ears
0.85
normalized 0–1
〰️
Whiskers
0.72
normalized 0–1
🐾
Fur texture
0.91
normalized 0–1

The network doesn't see a photo — it sees numbers. Each feature is a measurement scaled to 0–1. High values mean "strongly present." These numbers are the only thing the network has to work with.

① Measure features
② Normalize to 0–1
③ Feed into layer 1

Step 2 of 6: Weights Shape the Signal

Every connection multiplies the input by a learned weight

Tap a neuron to see its weights
0.85Pointy ears0.72Whiskers0.91Fur texture0.620.520.630.300.650.770.410.480.57Cat0.67DogInputHidden 1Hidden 2Output

Every connection has a weight — a number that amplifies or dampens the signal. Tap any neuron to see the weights feeding into it.

Step 3 of 6: Neurons Sum It Up

Each neuron collects weighted signals and adds them together

INPUTVALUE×WEIGHT=PRODUCT
Pointy ears0.85×-0.57=-0.4845
Whiskers...×+0.48=...
Fur texture...×+0.68=...
Σ sum =...
z = 0.85×(-0.57) + ?×(?) + ?×(?) = ...

Each neuron is a collector. It takes every weighted input and sums them into one number — the weighted sum (z). This raw sum can be any real number. The activation function comes next.

Step 4 of 6: The Activation Function

Sigmoid squashes any number into a smooth 0–1 range

-4-202400.51z (weighted sum)σ(z)σ = 0.6177
z value:0.480.6177
z ≪ 0
Output → 0
z ≈ 0
Output ≈ 0.5
z ≫ 0
Output → 1

The sigmoid function squashes any number into a clean 0–1 range. Big positive → nearly 1. Big negative → nearly 0. This gives the neuron a smooth on/off switch — not binary, but a confidence level.

Step 5 of 6: Layer by Layer

Watch data ripple forward through the entire network

Data flows forward through the network
0.85Pointy ears0.72Whiskers0.91Fur textureCatDogInputHidden 1Hidden 2Outputdata flows forward
Input
avg: 0.827
Hidden 1
Hidden 2
Output

Each layer transforms its inputs with weights → sum → sigmoid, then passes the result forward. The features get progressively more abstract — from "pointy ears" to "cat-like patterns" to the final answer. No layer can peek ahead or look back.

Step 6 of 6: The Prediction

The output layer speaks — the network has made its guess

0.85Pointy ears0.72Whiskers0.91Fur texture0.620.520.630.300.650.770.410.480.57Cat0.57110.67Dog0.6715
① Inputs enter
② Weights shape signals
③ Layers transform
④ Output predicts