(self)
| 356 | class 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) |