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

Method testCondFalse

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

Source from the content-addressed store, hash-verified

365 self.assertEquals(self.evaluate(z), 34)
366
367 def testCondFalse(self):
368 x = constant_op.constant(2)
369 y = constant_op.constant(1)
370 z = control_flow_ops.cond(
371 math_ops.less(
372 x,
373 y), lambda: math_ops.multiply(x, 17), lambda: math_ops.add(y, 23))
374 self.assertEquals(self.evaluate(z), 24)
375
376 def testCondTrueLegacy(self):
377 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