Commit 36a065b4 authored by Ben Barsdell's avatar Ben Barsdell
Browse files

Use safe variance epsilon for float16 layer_norm

- The original epsilon value (1e-12) is too small for float16 and can
  cause NaNs in the output when the variance is small.
- This commit also adds float16 and float32 cases to LayerNormTest and
  improves the numerical robustness of the test logic.
parent 9850eea1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment