`F.normalize` returns ~1e12 gradient at zero-vector input instead of NaN, while the forward pass already returns NaN

May 20, 2026 · #184575
View on GitHub
Python Difficulty: Medium

Labels

triage review module: autograd module: correctness (silent) module: norms and normalization module: edge cases
Ready to work on this? Walk through the full fork-to-PR workflow so your first contribution goes smoothly.

Sign in required

Authenticate to use favourites & bookmarks

5