(self)
| 133 | |
| 134 | @test_util.run_deprecated_v1 |
| 135 | def testKeepDims(self): |
| 136 | for dtype in [np.float16, np.float32, np.double]: |
| 137 | x_np = np.random.rand(5, 5).astype(dtype) |
| 138 | with self.cached_session(use_gpu=True): |
| 139 | y_tf_np = math_ops.reduce_logsumexp(x_np, keepdims=True).eval() |
| 140 | self.assertEqual(y_tf_np.ndim, x_np.ndim) |
| 141 | y_np = log(np.sum(exp(x_np), keepdims=True)) |
| 142 | self.assertAllClose(y_tf_np, y_np) |
| 143 | |
| 144 | @test_util.run_deprecated_v1 |
| 145 | def testOverflow(self): |
nothing calls this directly
no test coverage detected