MachineLearning From Derivatives to Adam: Building Optimization Intuition with PyTorch From first and second derivatives to Adam optimizer: a hands-on walkthrough of key optimization ideas using PyTorch. Simple, minimal examples with gradients, momentum, and adaptive learning strategies to build deep intuition.