diff options
Diffstat (limited to 'tensorflow/python/ops/math_ops_test.py')
-rw-r--r-- | tensorflow/python/ops/math_ops_test.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tensorflow/python/ops/math_ops_test.py b/tensorflow/python/ops/math_ops_test.py index 17d90afb5d..76d943aaea 100644 --- a/tensorflow/python/ops/math_ops_test.py +++ b/tensorflow/python/ops/math_ops_test.py @@ -67,6 +67,16 @@ class LogSumExpTest(test_util.TensorFlowTestCase): self.assertShapeEqual(y_np, y_tf) y_tf_np = y_tf.eval() self.assertAllClose(y_tf_np, y_np) + + def testReductionIndices2(self): + for dtype in [np.float16, np.float32, np.double]: + x_np = np.random.rand(5, 5).astype(dtype) + with self.test_session(use_gpu=True): + y_tf = math_ops.reduce_logsumexp(x_np, reduction_indices=0) + y_np = log(np.sum(exp(x_np), axis=0)) + self.assertShapeEqual(y_np, y_tf) + y_tf_np = y_tf.eval() + self.assertAllClose(y_tf_np, y_np) def testKeepDims(self): for dtype in [np.float16, np.float32, np.double]: |