Course 3 · Deep Learning & Neural Networks · about 12 min
One neuron, three ingredients
By the end of this course you can explain what a neural network is, how it learns from its mistakes, and which kind of network suits which job.
An artificial neuron is a tiny calculator, loosely inspired by brain cells. It does three things:
- multiplies each input by a weight (how much that input matters),
- adds everything up, plus a bias (how easily it fires),
- squashes the result into a number between 0 and 1 with an activation function.
Above 0.5, we say the neuron "fires". Training a network means finding good weights and biases. Here, you are the training.
Try itTurn a neuron into an AND gate
Make the neuron fire only when both inputs are 1. Every row needs a ✓.
| Input 1 | Input 2 | Output | Should fire? |
|---|
CheckWhat does a weight control in a neuron?
Step 2
Layers make it deep
One neuron can only draw a simple dividing line. Networks stack many neurons in layers: an input layer, one or more hidden layers, and an output layer. Each layer passes its results to the next.
"Deep" learning simply means many hidden layers. Each layer builds on the one before it, so the network learns simple patterns first and combines them into complex ones.
Try itGive the network hidden neurons
This is a real network training in your browser. Pick a pattern, then compare 0, 3, 8 and 16 hidden neurons. With 0 it can only draw a straight line. You can also click the plot to add dots.
Dots are training data; rings are test data the network never trains on. Train and Test show the share it gets right.
Try itWhat does each layer of an image network learn?
Tap them from the first layer to the last.
CheckWhat makes a neural network "deep"?
Step 3
Learning from mistakes
A network learns in a loop that repeats millions of times:
- make a prediction,
- measure how wrong it was with a loss (one number for the size of the error),
- use backpropagation to work out how much each weight contributed to that error,
- nudge every weight a little in the direction that lowers the loss. This is gradient descent.
The size of each nudge is the learning rate. Think of walking down a foggy hill: small steps are slow, giant leaps can carry you past the bottom.
Geoffrey Hinton co-authored the 1986 paper that made backpropagation popular. Decades later he shared the 2018 Turing Award with Yoshua Bengio and Yann LeCun, and the 2024 Nobel Prize in Physics with John Hopfield.
Try itPick a learning rate
The ball starts on the side of the valley. Each step moves it downhill. Try small, medium and large learning rates.
CheckWhat does backpropagation work out?
Step 4
Different networks for different data
Three families of networks cover most of what you will meet:
- CNNs (convolutional neural networks) slide small filters across an image to find local patterns. Ideal for images.
- RNNs (recurrent neural networks) read a sequence one step at a time and carry a memory forward. They struggled with long texts.
- Transformers use attention: every word can look at every other word at once. Introduced in 2017, they power today's chatbots.
Yann LeCun built early CNNs in the late 1980s and 1990s. One version read handwritten numbers on bank cheques.
Try itWhich network fits?
CheckWhat lets a transformer connect words that are far apart in a text?
Step 5
When deep learning is worth it
Deep learning shines on messy, unstructured data: images, audio and text. It also has costs:
- it needs a lot of data and computing power,
- it is hard to explain why it made a decision,
- on small spreadsheets, simpler models like the decision trees and random forests from Course 2 often do just as well or better.
Good engineers pick the simplest tool that works.
Try itDeep learning, or something simpler?
CheckYour data is a spreadsheet with 300 rows. What should you try first?
Step 6 · Recap
What you learned
- A neuron multiplies inputs by weights, adds a bias, and squashes the result.
- Deep networks stack many layers, learning simple patterns first and complex ones later.
- Backpropagation finds each weight's share of the error; gradient descent nudges the weights, scaled by the learning rate.
- CNNs suit images, RNNs read sequences step by step, and transformers use attention.
- Deep learning needs lots of data; for small tables, try simpler models first.
Quick reviewThree questions from memory. No scrolling back.
Next up is Course 4, where you put these ideas into a real machine learning pipeline. Mark this course complete below when you're ready.