PR #123803
tensorflow/tensorflow · Gradients · Merged · 1 file changed
Added automated numerical Jacobian gradient verification for tf.math.igamma with respect to its x-input to guard against automatic differentiation regressions.
Checkout Pull Request
Inspect the full commit history and diff locally from upstream tensorflow/tensorflow.
$gh pr checkout 123803 --repo tensorflow/tensorflowAdded automated numerical Jacobian gradient verification for tf.math.igamma with respect to its x-input to guard against automatic differentiation regressions.
File-by-File Modification Breakdown (1)
- +15 / -0
tensorflow/python/ops/math_grad_test.py
Python/XLA regression test suite verifying edge-case behavior
Changed Files (1)
1. Introduction & Motivation
Accurate gradients through special functions are critical for variational inference and differentiable physics. While tf.math.igamma had forward evaluation tests, automated numerical Jacobian checks verifying the analytic x-gradient against finite differences were missing.
2. Jacobian Verification Formulation
For , the analytic partial derivative with respect to is:
We validate the reverse-mode gradient against the central finite-difference Jacobian :
3. References
- Baydin et al., Automatic Differentiation in Machine Learning: a Survey, JMLR 2018.