diff options
author | Smit Hinsu <hinsu@google.com> | 2018-07-19 11:49:44 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-19 11:52:46 -0700 |
commit | 3d6c8b8aae8433b16af61097641b9958e679fb3d (patch) | |
tree | f9d74368a29081a059b0af75f0f2c49e4b6326d0 /tensorflow/python/grappler | |
parent | 8571b4f3d2d06caefd8f714d7ea98a3701ea3a96 (diff) |
Assert closeness of output values instead of equality in layout optimizer tests
using convolutions
Convolution output may differ across convolution algorithms and is not guaranteed to match exactly.
PiperOrigin-RevId: 205276671
Diffstat (limited to 'tensorflow/python/grappler')
-rw-r--r-- | tensorflow/python/grappler/layout_optimizer_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/grappler/layout_optimizer_test.py b/tensorflow/python/grappler/layout_optimizer_test.py index 7d07c77c79..8cc971c61d 100644 --- a/tensorflow/python/grappler/layout_optimizer_test.py +++ b/tensorflow/python/grappler/layout_optimizer_test.py @@ -1340,7 +1340,7 @@ class LayoutOptimizerTest(test.TestCase): expected_num_transposes = 2 self.assertEqual(expected_num_transposes, num_transposes) self._assert_trans_nhwc_to_nchw('Conv2D-0', nodes) - self.assertAllEqual(output_val_ref, output_val) + self.assertAllClose(output_val_ref, output_val, atol=1e-3) def testLoop(self): if test.is_gpu_available(cuda_only=True): |