(self)
| 385 | |
| 386 | @test_util.run_deprecated_v1 |
| 387 | def testInt(self): |
| 388 | np.random.seed(54321) |
| 389 | for num_inputs in range(1, 10): |
| 390 | x = [ |
| 391 | np.random.randint(-128, 128, (5, 4, 3, 2, 1)) |
| 392 | for _ in range(num_inputs) |
| 393 | ] |
| 394 | tf_x = ops.convert_n_to_tensor(x) |
| 395 | with self.cached_session(use_gpu=True): |
| 396 | self.assertAllEqual(sum(x), math_ops.add_n(tf_x).eval()) |
| 397 | self.assertAllEqual(x[0] * num_inputs, |
| 398 | math_ops.add_n([tf_x[0]] * num_inputs).eval()) |
| 399 | |
| 400 | @test_util.run_deprecated_v1 |
| 401 | def testGrad(self): |
nothing calls this directly
no test coverage detected