import tensorflow as tf

def batch_norm(inp, name, phase, decay=0.9):
    
    channels = inp.get_shape().as_list()[3]
    
    with tf.variable_scope(name):
        moving_mean = get_variable("mean", shape=[channels], dtype=tf.float32, initializer=tf.constant_initializer(0.0), trainable=False)
        moving_variance = get_variable("var", shape=[channels], dtype=tf.float32, initializer=tf.constant_initializer(1.0), trainable=False)
        
