AI in Motion

Neural Networks: The Forward Pass

Deep LearningBeginner1:366 chapters

Stack neurons into layers and connect them. Watch signals flow from input to output and become class probabilities.

📄 Illustrated notes · every chapter as a picture · printable

Shortcuts: Space play/pause · ←/→ 5 s · N/P chapter · M voice · C subtitles · F fullscreen

Quick quiz

3 questions to check your understanding.

Q1 In a forward pass, information flows…
Q2 What does the weight matrix W contain?
Q3 Why are GPUs useful for neural networks?

Go deeper

University-level written lectures in The AI Lecture Hall:

Transcript

Introduction. One neuron can only draw a straight line. Connect many of them in layers, and you get a neural network that can learn remarkably complex patterns.

A forward pass. This network has four inputs, two hidden layers of six neurons and three outputs. In a forward pass, signals flow from left to right. Each neuron combines the signals from the previous layer, and the output layer produces probabilities: 81 percent cat, 14 percent dog, 5 percent bird.

Matrix form. In practice we compute a whole layer at once with a matrix. Multiply the inputs by the weight matrix W, add the biases, and apply the activation. A network is just these layers chained together, which is why GPUs, built for matrix maths, are so useful.

Why layers?. Why use layers? Each layer builds on the one before. Early layers detect simple patterns and later layers combine them into complex ones. In theory, a network with enough neurons can approximate almost any function.

Going deeper. Here is a deeper network with three hidden layers, deciding whether an email is spam. More layers let the network build more abstract features, as long as we have enough data to train it.

Recap. To recap. Networks arrange neurons in layers. The forward pass flows from input to output. Each layer computes f of W x plus b. And depth builds complex features from simple ones.