in robosumo/policy_zoo/utils.py [0:0]
def switch(condition, if_exp, else_exp):
x_shape = copy.copy(if_exp.get_shape())
x = tf.cond(tf.cast(condition, 'bool'),
lambda: if_exp,
lambda: else_exp)
x.set_shape(x_shape)
return x