(self)
| 339 | |
| 340 | @test_util.run_deprecated_v1 |
| 341 | def testFloat(self): |
| 342 | np.random.seed(12345) |
| 343 | x = [np.random.random((1, 2, 3, 4, 5)) - 0.5 for _ in range(5)] |
| 344 | tf_x = ops.convert_n_to_tensor(x) |
| 345 | with self.session(use_gpu=True): |
| 346 | self.assertAllClose(sum(x), math_ops.accumulate_n(tf_x).eval()) |
| 347 | self.assertAllClose(x[0] * 5, math_ops.accumulate_n([tf_x[0]] * 5).eval()) |
| 348 | |
| 349 | @test_util.run_deprecated_v1 |
| 350 | def testInt(self): |