Lazy-eval equivalent of "and" for Tensors.
(cond, b)
| 49 | |
| 50 | |
| 51 | def _tf_lazy_and(cond, b): |
| 52 | """Lazy-eval equivalent of "and" for Tensors.""" |
| 53 | # TODO(mdan): Enforce cond is scalar here? |
| 54 | return control_flow_ops.cond(cond, b, lambda: cond) |
| 55 | |
| 56 | |
| 57 | def _py_lazy_and(cond, b): |