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

Method testFloat

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected