Sharpness-Aware Minimization (SAM) is an optimizer designed to improve generalization in overparameterized deep learning models by seeking flat minima in the loss landscape rather than just minimizing loss. The article explains the mathematical intuition behind sharpness and why flat minima correlate with better generalization,
•16m read time• From towardsdatascience.com
Table of contents
Introduction : Overparameterization, Generalizability, and SAMThe Notion of SharpnessThe Sharpness-Aware Minimization (SAM) AlgorithmPyTorch Implementation in a Training LoopA Caveat: SAM with BatchNormDemo: Image classification with ResNet-18Concluding RemarksSort: