def _cond(condition, then_lambda, else_lambda):
 try:
  cond_fn = tf.cond
 except AttributeError:
  from tensorflow.python.ops import control_flow_ops
  cond_fn = control_flow_ops.cond
 return cond_fn(condition, then_lambda, else_lambda)

def _cond ( condition , then_lambda , else_lambda ) : try : cond_fn = tf . cond except AttributeError : from tensorflow . python . ops import control_flow_ops cond_fn = control_flow_ops . cond return cond_fn ( condition , then_lambda , else_lambda )
backwards compatible interface to tf .