diff options
Diffstat (limited to 'tensorflow/python/kernel_tests/cwise_ops_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/cwise_ops_test.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tensorflow/python/kernel_tests/cwise_ops_test.py b/tensorflow/python/kernel_tests/cwise_ops_test.py index 0846470abc..b47139e6b8 100644 --- a/tensorflow/python/kernel_tests/cwise_ops_test.py +++ b/tensorflow/python/kernel_tests/cwise_ops_test.py @@ -200,6 +200,8 @@ class UnaryOpTest(test.TestCase): self._compareBoth(x, np.expm1, math_ops.expm1) self._compareBoth(z, np.log, math_ops.log) self._compareBoth(z, np.log1p, math_ops.log1p) + self._compareBoth(x, np.sinh, math_ops.sinh) + self._compareBoth(x, np.cosh, math_ops.cosh) self._compareBoth(x, np.tanh, math_ops.tanh) self._compareBoth(x, self._sigmoid, math_ops.sigmoid) self._compareBoth(x, self._log_sigmoid, math_ops.log_sigmoid) @@ -245,6 +247,8 @@ class UnaryOpTest(test.TestCase): self._compareBoth(x, np.expm1, math_ops.expm1) self._compareBoth(x, np.log, math_ops.log) self._compareBoth(x, np.log1p, math_ops.log1p) + self._compareBoth(x, np.sinh, math_ops.sinh) + self._compareBoth(x, np.cosh, math_ops.cosh) self._compareBoth(x, np.tanh, math_ops.tanh) self._compareBoth(x, self._sigmoid, math_ops.sigmoid) self._compareBoth(x, np.sign, math_ops.sign) @@ -285,6 +289,8 @@ class UnaryOpTest(test.TestCase): self._compareBoth(x, np.expm1, math_ops.expm1) self._compareBoth(z, np.log, math_ops.log) self._compareBoth(z, np.log1p, math_ops.log1p) + self._compareBoth(x, np.sinh, math_ops.sinh) + self._compareBoth(x, np.cosh, math_ops.cosh) self._compareBoth(x, np.tanh, math_ops.tanh) self._compareBoth(x, self._sigmoid, math_ops.sigmoid) self._compareBoth(y, np.sign, math_ops.sign) @@ -389,6 +395,8 @@ class UnaryOpTest(test.TestCase): self._compareCpu(x, np.expm1, math_ops.expm1) self._compareCpu(y, np.log, math_ops.log) self._compareCpu(y, np.log1p, math_ops.log1p) + self._compareCpu(x, np.sinh, math_ops.sinh) + self._compareCpu(x, np.cosh, math_ops.cosh) self._compareCpu(x, np.tanh, math_ops.tanh) self._compareCpu(x, self._sigmoid, math_ops.sigmoid) self._compareCpu(x, np.sin, math_ops.sin) @@ -423,6 +431,8 @@ class UnaryOpTest(test.TestCase): self._compareCpu(x, np.expm1, math_ops.expm1) self._compareCpu(y, np.log, math_ops.log) self._compareCpu(y, np.log1p, math_ops.log1p) + self._compareCpu(x, np.sinh, math_ops.sinh) + self._compareCpu(x, np.cosh, math_ops.cosh) self._compareCpu(x, np.tanh, math_ops.tanh) self._compareCpu(x, self._sigmoid, math_ops.sigmoid) self._compareCpu(x, np.sin, math_ops.sin) @@ -697,6 +707,11 @@ class BinaryOpTest(test.TestCase): except ImportError as e: tf_logging.warn("Cannot test special functions: %s" % str(e)) + def testUint8Basic(self): + x = np.arange(1, 13, 2).reshape(1, 3, 2).astype(np.uint8) + y = np.arange(1, 7, 1).reshape(1, 3, 2).astype(np.uint8) + self._compareBoth(x, y, np.add, math_ops.add) + def testInt8Basic(self): x = np.arange(1, 13, 2).reshape(1, 3, 2).astype(np.int8) y = np.arange(1, 7, 1).reshape(1, 3, 2).astype(np.int8) |