Machine Learning
Lesson 4 of 4 10 min +70 XP

Neural Networks

Layers of neurons that learn features.

What you'll learn

  • Describe an artificial neuron
  • Explain why nonlinear activations matter
  • Outline how a network learns
The office of specialists

A hard decision passes through an office: front-desk staff catch simple details, pass them up to specialists who spot bigger patterns, up to a manager who makes the call. A neural network stacks layers of simple 'neurons' the same way to learn complex features.

From neurons to networks

An artificial neuron computes a weighted sum of its inputs, adds a bias, and passes the result through a nonlinear activation function. Stacking neurons into layers forms a neural network; early layers learn simple features and later layers combine them into complex ones. Training adjusts the weights via gradient descent and backpropagation.

Why nonlinearity?

Without a nonlinear activation, stacking layers just produces another linear function. Nonlinear activations (like ReLU) let networks approximate complex, curved relationships.

In image recognition, first layers detect edges, middle layers detect shapes, and deeper layers detect whole objects — features learned, not hand-coded.
Lab · What does one neuron do?
  1. A neuron receives inputs x₁, x₂ with weights w₁, w₂ and bias b.
  2. Write the value it computes before activation.
  3. State what the activation function then does.

What you should see: It computes w₁x₁ + w₂x₂ + b, then the activation function applies a nonlinearity to that sum to produce the neuron's output.

Knowledge Check

+20 XP / correct

1. Nonlinear activation functions are needed because without them a deep network…

2. In image recognition, deeper layers of a network typically detect…