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

Method testInt

tensorflow/python/ops/math_ops_test.py:350–356  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

348
349 @test_util.run_deprecated_v1
350 def testInt(self):
351 np.random.seed(54321)
352 x = [np.random.randint(-128, 128, (5, 4, 3, 2, 1)) for _ in range(6)]
353 tf_x = ops.convert_n_to_tensor(x)
354 with self.session(use_gpu=True):
355 self.assertAllEqual(sum(x), math_ops.accumulate_n(tf_x).eval())
356 self.assertAllEqual(x[0] * 6, math_ops.accumulate_n([tf_x[0]] * 6).eval())
357
358
359class AddNTest(test_util.TensorFlowTestCase):

Callers

nothing calls this directly

Calls 6

sumFunction · 0.85
rangeFunction · 0.70
seedMethod · 0.45
sessionMethod · 0.45
assertAllEqualMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected