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