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

Method testCondTrue

tensorflow/python/ops/control_flow_ops_test.py:358–365  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

356class CondTest(test_util.TensorFlowTestCase):
357
358 def testCondTrue(self):
359 x = constant_op.constant(2)
360 y = constant_op.constant(5)
361 z = control_flow_ops.cond(
362 math_ops.less(
363 x,
364 y), lambda: math_ops.multiply(x, 17), lambda: math_ops.add(y, 23))
365 self.assertEquals(self.evaluate(z), 34)
366
367 def testCondFalse(self):
368 x = constant_op.constant(2)

Callers

nothing calls this directly

Calls 6

multiplyMethod · 0.80
assertEqualsMethod · 0.80
constantMethod · 0.45
condMethod · 0.45
addMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected