Artificial Intelligence — Level 3: Deep Learning, Computer Vision & NLP
Get Started Free
Free preview
Neurons, layers and activations
Lecture notes
An artificial neuron
A neuron computes a weighted sum of its inputs plus a bias, then applies an activation function:
z = w1·x1 + w2·x2 + … + wn·xn + b
output = activation(z)
The weights and bias are the parameters learned from data.
Layers and networks
- The input layer receives features (pixels, word vectors, tabular values).
- Hidden layers transform them into increasingly abstract representations.
- The output layer produces predictions.
- In a dense (fully connected) layer, every neuron connects to every neuron of the previous layer.
- "Deep" learning means many hidden layers. A network with 784 inputs, a hidden layer of 128 and 10 outputs has 784×128 + 128 + 128×10 + 10 = 101,770 parameters.
Why activation functions?
Without non-linear activations, stacked layers collapse into one linear model. Activations let networks learn complex, non-linear patterns.
- ReLU: max(0, z) — default for hidden layers; simple and effective.
- Sigmoid: squashes to (0, 1) — output for binary classification.
- Softmax: turns a vector into probabilities summing to 1 — output for multi-class classification.
- Tanh: (−1, 1); GELU: used in transformers.
- No activation (linear) for regression outputs.
Universal approximation
A network with enough hidden units can approximate almost any function — but finding good weights requires data, compute and careful training, which the next lessons cover.
Want to go further?
20 h · Enroll to access every lesson and earn the certificate.