pytorch
56f4b69c - [Expanded Weights] Fix instance norm (#79800)

Commit
2 years ago
[Expanded Weights] Fix instance norm (#79800) Opacus found an issue with the input (batched) gradients produced from instance norm. What was surprising is that we are testing that the input gradients match--but here the input gradients with instance norm are so close to 0 (typically around 1e-10) that they all look the same. It only shows up if you use another layer in front of instance norm so those small differences get magnified. This fixes the bug and makes sure that each layer we support is used in a test with a model at least once Pull Request resolved: https://github.com/pytorch/pytorch/pull/79800 Approved by: https://github.com/zou3519, https://github.com/albanD
Author
samdow
Committer
Parents
Loading