[XLA] Don't compute relative error when the expected value is 0.
authorJustin Lebar <jlebar@google.com>
Sat, 26 May 2018 03:23:31 +0000 (20:23 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Sat, 26 May 2018 03:26:13 +0000 (20:26 -0700)
commit336d77ea19be48efad6025f824a58f89a87ce097
tree417c809873a975cc7e83a168e958619fc881ad14
parent32e21641d774ba783cdb2312bf4971b9481f57ca
[XLA] Don't compute relative error when the expected value is 0.

In literal_comparison, don't try to compute a relative error when the
expected value is 0, because doing so would mean that the only
acceptable value *is* zero, which probably isn't what you mean.

PiperOrigin-RevId: 198137414
tensorflow/compiler/xla/literal_comparison.cc