Test that previously revealed a bug in buffer forwarding for AddN.
(self)
| 360 | |
| 361 | @test_util.run_deprecated_v1 |
| 362 | def testPartials(self): |
| 363 | """Test that previously revealed a bug in buffer forwarding for AddN.""" |
| 364 | partials = [] |
| 365 | for _ in range(98): |
| 366 | partials.append(math_ops.add_n([constant_op.constant(1)])) |
| 367 | partials.append( |
| 368 | math_ops.add_n([constant_op.constant(1), |
| 369 | constant_op.constant(1)])) |
| 370 | |
| 371 | res = math_ops.add_n(partials) + constant_op.constant(0) |
| 372 | with self.session(use_gpu=True): |
| 373 | self.assertAllEqual(res.eval(), 100) |
| 374 | |
| 375 | @test_util.run_deprecated_v1 |
| 376 | def testFloat(self): |