import tensorflow as tf

            # execute at test time
            return tf.nn.batch_normalization(x, pop_mean, pop_var, beta, gamma, epsilon)

        return tf.cond(train, func1, func2)

def average_gradients(tower_grads):
