[XLA] Use Expm1 in Elu/Selu
authorDavid Majnemer <majnemer@google.com>
Thu, 17 May 2018 22:28:33 +0000 (15:28 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 17 May 2018 22:33:31 +0000 (15:33 -0700)
commit0cde87e83883c1b98b28b41ed175922b845e650b
treebce0bd07c9dbb1d0545e3db9d0345ad26dfc22b9
parentc1ea01275b93e2d1f96ad1bdacc6aacf6fe231d7
[XLA] Use Expm1 in Elu/Selu

exp(x) - 1 is best executed using the composed Expm1 operation as it is better
behaved when exp(x) is near 1.

PiperOrigin-RevId: 197061826
tensorflow/compiler/tests/unary_ops_test.py
tensorflow/compiler/tf2xla/kernels/elu_op.cc