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

Method testAcceptsTensor

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

Source from the content-addressed store, hash-verified

317
318 @test_util.run_in_graph_and_eager_modes
319 def testAcceptsTensor(self):
320 tensor = array_ops.ones([10, 10])
321 result = math_ops.scalar_mul(3, tensor)
322 expected = array_ops.ones([10, 10]) * 3
323
324 with test_util.device(use_gpu=True):
325 self.assertAllEqual(self.evaluate(expected), self.evaluate(result))
326
327 @test_util.run_in_graph_and_eager_modes
328 def testAcceptsIndexedSlices(self):

Callers

nothing calls this directly

Calls 4

onesMethod · 0.80
deviceMethod · 0.45
assertAllEqualMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected