AI Hints
Home›Deep Learning Tutorial›Review: Deep Learning
Deep Learning · Lesson 82 of 92

Review: How Networks Learn

Lock in the core.

⏱ 2 min read▶ Video at 2:32:24🎓 Free
Watch this lesson in the Deep Learning courseWatch on YouTube ↗Full Deep Learning course

Before the capstone, let's make this knowledge stick. Pause on each question, and commit to an answer. Getting one wrong now is a gift, because you'll remember the correction.

Review: How Networks Learn
From the video: Review: How Networks Learn
  • Make it stick
  • Pause and commit
  • Wrong answers are a gift

Recap: learning

A network is layers of simple maths. Autograd finds the slope of the loss for each weight. The optimiser steps downhill. The learning rate sets how far. Activations bend the function. Normalisation keeps signals steady. And regularisation stops memorising.

Autogradfinds the slopes
Learning ratemost important setting
Activationsadd curves
Regularisationstops memorising

Question 1

Question 1. What should the starting loss be with ten classes? A, Zero. B, About 2.3. C, About 10. D, One. Pause and choose. The answer is B. That's random guessing.

Quick check
What should the starting loss be with ten classes?

Question 2

Question 2. What's the fastest check for a training bug? A, Train for a week. B, Overfit one small batch. C, Buy a GPU. D, Read a paper. Pause and choose. The answer is B. It should reach almost zero.

Quick check
What's the fastest check for a training bug?

Question 3

Question 3. Why does a model behave differently after model.eval()? A, New weights. B, Batch norm and dropout change behaviour. C, It loads faster. D, It trains more. Pause and choose. The answer is B. Forgetting it is a classic bug.

Quick check
Why does a model behave differently after model.eval()?

Question 4

Question 4. Why do surviving values get scaled up in dropout? A, To keep the average signal the same. B, To add noise. C, To save memory. D, To go faster. Pause and choose. The answer is A. Half zero, half doubled.

Quick check
Why do surviving values get scaled up in dropout?

Question 5

Question 5. Why sample learning rates on a log scale? A, Tradition. B, 0.001 and 0.01 differ as much as 1 and 10. C, It is faster. D, It uses less memory. Pause and choose. The answer is B. That's how networks respond.

Quick check
Why sample learning rates on a log scale?

Question 6

Question 6. What does a sudden spike in gradient norm warn you about? A, Nothing. B, Training is about to go wrong. C, Faster training. D, Better accuracy. Pause and choose. The answer is B. Log it.

Quick check
What does a sudden spike in gradient norm warn you about?

Summary

Next, the great architectures.

Key takeaways
  • Overfit a batch first
  • Use eval() for testing
  • Log the gradient norm
Next up: Review: Architectures — from convolutions to transformers