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

Method testBasic

tensorflow/python/kernel_tests/cond_v2_test.py:95–107  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93
94 @test_util.run_deprecated_v1
95 def testBasic(self):
96 x = constant_op.constant(1.0, name="x")
97 y = constant_op.constant(2.0, name="y")
98
99 def true_fn():
100 return x * 2.0
101
102 def false_fn():
103 return y * 3.0
104
105 self._testCond(true_fn, false_fn, [x])
106 self._testCond(true_fn, false_fn, [x, y])
107 self._testCond(true_fn, false_fn, [y])
108
109 def testExternalControlDependencies(self):
110 with ops.Graph().as_default(), self.test_session():

Callers

nothing calls this directly

Calls 2

_testCondMethod · 0.95
constantMethod · 0.45

Tested by

no test coverage detected