← All Neural Networks & Deep Learning modules

Module 1 — From a Neuron to a Network

The building block · hands-on · about 25 minutes.

A deep neural network sounds exotic, but it is built from one tiny, almost boring part repeated millions of times: the artificial neuron. If you understand this single unit, you understand the atom that everything else — image recognizers, chatbots, the whole field — is made of. And you already met it in Course 3: it is the regression line \( w x + b \) with one twist.

What one neuron does

A neuron takes some inputs, gives each a weight, adds them up, adds a bias, and squashes the result through an activation function. That’s the whole thing:

\[ \text{output} \;=\; \sigma\!\big(w_1 x_1 + w_2 x_2 + b\big) \]

One neuron is already a decision-maker

The weighted sum \( w_1 x_1 + w_2 x_2 + b \) draws a straight line through the input space. On one side the neuron says "yes" (output near 1), on the other "no" (near 0). Below, two inputs can each be off (0) or on (1) — the four corners of a square. Drag the weights and bias and steer that line until the neuron behaves like a logic gate.

This activity needs JavaScript. The lesson below still covers everything.

Why stack them? Because one line isn’t enough

A single neuron can only split its world with one straight cut. That is powerful — but the moment a problem needs two cuts (think of the four corners where "exactly one input is on" should mean yes — the famous XOR problem), one neuron can’t do it. The fix is to wire neurons together: feed several neurons the same inputs, then feed their outputs into another neuron. That stack — a network — is what the rest of this course trains. Module 3 builds your first one.

The same neuron in Keras — read only, nothing to install
from tensorflow.keras.layers import Dense

# one neuron: 2 inputs, sigmoid activation — exactly the formula above
layer = Dense(1, activation='sigmoid', input_shape=(2,))
# its weights are [w1, w2] and its bias is b — the knobs you just dragged

A Dense(1) layer is one neuron. A real network is just Dense layers stacked, each holding many neurons.

AI anchor — the atom of every deep model The neuron you tuned here is the single repeated unit inside every neural network on Earth, from a 3-neuron toy to GPT-scale language models with hundreds of billions of weights. Nothing about the unit changes at scale — it is always weighted sum, bias, activation. What changes is how many there are and how they are wired. Understanding this one cell is genuinely understanding the building block of modern AI.

Check your understanding

A few questions about the neuron. You will get a score.

This activity needs JavaScript.

Why this matters next You saw the activation squash the sum into a 0–1 answer. Module 2 is all about that squash: the different activation functions, and the surprising reason a network literally cannot learn anything interesting without one.
One-sentence summary: an artificial neuron takes a weighted sum of its inputs, adds a bias, and passes the result through an activation function — a single neuron draws one straight decision line, and stacking neurons into a network is what lets it draw anything more complex.

Next: Activation Functions →