Lensa ML
Lensa ML

How Neural Networks Work

Step 1 of 6

It Starts With a Photo

How a neural network sees a picture of a cat

Cat photo
raw pixels
🔍
Extract
features
Pointy ears0.85
Whiskers0.72
Fur texture0.91

A neural network can't see a photo. First, the image is scanned for featurespointy ears, whiskers, fur texture. Each becomes a number 0–1. These numbers are what the network works with.

GOAL
Cat = 1.0
GOAL
Dog = 0.0

We'll follow this cat photo through every step of the network.

Step 1 of 6: It Starts With a Photo

How a neural network sees a picture of a cat

Cat photo
raw pixels
🔍
Extract
features
Pointy ears0.85
Whiskers0.72
Fur texture0.91

A neural network can't see a photo. First, the image is scanned for featurespointy ears, whiskers, fur texture. Each becomes a number 0–1. These numbers are what the network works with.

GOAL
Cat = 1.0
GOAL
Dog = 0.0

We'll follow this cat photo through every step of the network.

Step 2 of 6: What's a Neuron?

One tiny decision-maker that weighs the cat's features

0.85Pointy ears×0.60.72Whiskers×-0.30.91Fur texture×0.80.74σ(Σ) = 0.735output0.735

This neuron receives the cat's features. Fur texture (×0.8) and pointy ears (×0.6) get high weights — strong cat signals. Whiskers (×-0.3) are negative — dogs have them too.

Step 3 of 6: Layers & Connections

Tap any neuron to see how it processes the cat features

Cat features enter the network
0.85Pointy ears0.72Whiskers0.91Fur texture0.620.520.630.300.650.770.410.480.57Cat0.67DogInputHidden 1Hidden 2Output

The cat's 3 features pass through hidden layers that detect combinations of features. Tap any neuron to see the math.

Step 4 of 6: Tune the Weights

Same network — drag the weights and watch the prediction shift

Drag weights — watch the prediction shift
-0.02+0.05+0.07+0.67+0.60-0.61-0.600.85Pointy ears0.72Whiskers0.91Fur texture0.620.520.630.300.650.770.410.480.57Cat0.67DogInputHidden 1Hidden 2Output
Cat (goal: 1.0)
0.571
Dog (goal: 0.0)
0.671
Hidden 1 #2
Pointy ears
0.85×w=-0.017
-0.02
Whiskers
0.72×w=+0.036
+0.05
Fur texture
0.91×w=+0.064
+0.07

It thinks Dog! Boost cat-signal weights.

Step 5 of 6: The Forward Pass

Watch the cat features flow through to a final answer

Cat features flowing through the network
0.85Pointy ears0.72Whiskers0.91Fur textureCatDogInputHidden 1Hidden 2Output

Pointy ears, whiskers, fur texture flow forward. Output: Cat=0.57, Dog=0.67. Not confident enough — needs training.

Step 6 of 6: How It Learns

Step through the training loop — the network learns to recognize cats

Teaching the network this cat
Forward
⚖️
Compare
Backprop
🔧
Update
0.85Pointy ears0.72Whiskers0.91Fur texture0.620.520.630.300.650.770.410.480.57Catgoal 1.00.67Doggoal 0.0InputHidden 1Hidden 2Output

Forward: Cat features flow forward — ears, whiskers, fur — same as Step 5.

EPOCH
0
LOSS
1.673