Course revieweight questions
Questions from the whole course
Each question comes from one lesson of Calculus and Optimization for AI, and they are mixed, so you meet each idea away from its lesson. A wrong answer says why, and takes you back to that lesson.
Review
Eight questions from across the course. Answer as often as you like.
1 of 8
From Gradient descent and the learning rate
You stand at weights (0, 0). The gradient there, the uphill arrow, is [-3, -8]. The learning rate is 0.1. After one step, what is the second weight, b?
2 of 8
From Stochastic gradient descent
The same work, two ways: one step on all 1,000 examples, or 20 steps on batches of 50 picked at random. Which usually ends lower?
3 of 8
From Functions and loss
A line misses one penguin by +1 kg and another by −1 kg. Its average miss is 0. What does that tell you about the line?
4 of 8
From Partial derivatives and the gradient
At some weights, the slope along w is 3 and the slope along b is −1. Which way lowers the loss the fastest?
5 of 8
From Loss landscapes
The penguins' line with two layers: its tilt is w1 × w2, and b stays 4.2. A walker starts at w1 = 0 and w2 = 0, where the loss is 0.641. What is its loss after 40 steps at a learning rate of 0.1?
6 of 8
From The derivative
At w = 0, after loss.backward(), PyTorch prints w.grad as tensor(-1.9595). What does that tell you?
7 of 8
From The chain rule
Nudge a weight, and a model's guess moves 4 times as much. Nudge the guess, and the loss falls half as much as the guess rises: a rate of −0.5. What is the loss's rate for the weight?
8 of 8
From Momentum and Adam
Your code says torch.optim.Adam(model.parameters()), with no learning rate. After many steps, the loss has hardly moved. What do you try?
