Jeff Liu Lab
HomeProjectsWorkshopAI WikiAI LabShop
Sign In
All
Computing Science
Artificial Intelligence
Deep Learning
Reinforcement Learning
AI Agents
Embodied Intelligence
Robot Engineering
Human-Like Intelligence
AI Engineering
← Back to Wiki
Computing Science
Calculus
Linear Algebra
Probability Theory
Information Theory
Statistics
Automatic Differentiation
Discrete Mathematics
Numerical Methods
Optimization Theory
Graph Theory Fundamentals

Comments (0)

Sign in to comment

Table of Contents
What Is Automatic DifferentiationComparison of Three Differentiation MethodsComputational GraphForward Mode ADDual NumbersForward Mode ComputationCharacteristics of Forward ModeReverse Mode ADReverse Mode ComputationCharacteristics of Reverse ModeForward Mode vs. Reverse ModeChain Rule and BackpropagationMathematical DerivationExample: A Simple Two-Layer NetworkAutomatic Differentiation in PyTorchBasic UsageGradient Accumulation and ZeroingThe torch.no_grad() ContextThe detach() MethodCommon Pitfalls1. In-place Operations Breaking the Computational Graph2. detach() vs. no_grad()3. Proper Use of Gradient Accumulation4. Calling backward() on Non-scalar Outputs

© 2026 Jeff Liu Lab. All rights reserved.

AboutPricingPrivacy & TermsContact