diff options
author | 2017-03-16 09:30:13 -0800 | |
---|---|---|
committer | 2017-03-16 10:57:50 -0700 | |
commit | c15c8e766b280fcaa0ed09617842762116c8fe4d (patch) | |
tree | de2e3c71de2cc717f6b1567cd27e01b73b70de0e /tensorflow/compiler/tests/unary_ops_test.py | |
parent | 0007026a660f8e67937306759030bc400eb6c796 (diff) |
[TF:XLA] Implement tf.round in the XLA bridge.
Change: 150336339
Diffstat (limited to 'tensorflow/compiler/tests/unary_ops_test.py')
-rw-r--r-- | tensorflow/compiler/tests/unary_ops_test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/compiler/tests/unary_ops_test.py b/tensorflow/compiler/tests/unary_ops_test.py index f0b80d1ffd..c96826fd0a 100644 --- a/tensorflow/compiler/tests/unary_ops_test.py +++ b/tensorflow/compiler/tests/unary_ops_test.py @@ -160,6 +160,13 @@ class UnaryOpsTest(XLATestCase): expected=np.log1p(np.array([[1e-14, 1e-15, 0.6]], dtype=dtype))) self._assertOpOutputMatchesExpected( + math_ops.round, + np.array([[-1.7, 1.2, 4.0, 0.0], [-3.5, -2.5, -1.5, -0.5], + [0.5, 1.5, 2.5, 3.5]], dtype=dtype), + expected=np.array([[-2, 1, 4, 0], [-4, -2, -2, 0], [0, 2, 2, 4]], + dtype=dtype)) + + self._assertOpOutputMatchesExpected( math_ops.rsqrt, np.array([[4, 16]], dtype=dtype), expected=np.array([[0.5, 0.25]], dtype=dtype)) |