MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testPartials

Method testPartials

tensorflow/python/ops/math_ops_test.py:362–373  ·  view source on GitHub ↗

Test that previously revealed a bug in buffer forwarding for AddN.

(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 6

rangeFunction · 0.70
appendMethod · 0.45
constantMethod · 0.45
sessionMethod · 0.45
assertAllEqualMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected