Skills101
← All practice quizzes

Quiz: Gradient Descent

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

How a model actually learns: mean squared error as a loss, the gradient as the direction downhill, the update rule, choosing a learning rate (too small, just right, divergence), vectorised gradient descent for many features, why scaling helps, and batch vs stochastic vs mini-batch.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What does the gradient of the loss tell you?

  2. Question 2

    Which is the gradient descent update rule?

  3. Question 3

    What does this print?

    import numpy as np
    x = np.array([1.0, 2.0])
    y = np.array([3.0, 5.0])
    w, b = 2.0, 0.0
    print(np.mean((w * x + b - y) ** 2))
    
  4. Question 4

    The training loss becomes inf after a few epochs. What is the most likely fix?

  5. Question 5

    With learning rate 0.001, the loss was still about 130 after 500 epochs. Why?

🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →