Chain Rule & Automatic Differentiation

The chain rule is the engine behind every neural network that learns.

Build 1.5 hr Python

Prerequisites: Phase 1, Lesson 04 (Derivatives & Gradients)

#Learning Objectives

  • Build a minimal autograd engine (Value class) that records operations and computes gradients via reverse-mode autodiff
  • Implement forward and backward passes through a computation graph using topological sort
  • Construct and train a multi-layer perceptron on XOR using only the from-scratch autograd engine
  • Verify autodiff correctness using gradient checking against numerical finite differences
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.