def switch(condition, then_expression, else_expression):
    x_shape = copy.copy(then_expression.get_shape())
    x = tf.python.control_flow_ops.cond(tf.cast(condition, 'bool'),
                                        lambda: then_expression,
                                        lambda: else_expression)
    x.set_shape(x_shape)
    return x
Return value converted from Tcl object to Python object.
dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py/switch--crossover with--dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/lib-tk/ttk.py/_tclobj_to_py