import tensorflow as tf

    with tf.variable_scope(scope):
        V = tf.get_variable('V', shape=list(filter_size) + [int(x.get_shape()[-1]), num_filters], dtype=tf.float32,
                              initializer=tf.random_normal_initializer(0, 0.05), trainable=True)

        g = tf.get_variable('g', shape=[num_filters], dtype=tf.float32,
                              initializer=tf.constant_initializer(1.), trainable=True)
        b = tf.get_variable('b', shape=[num_filters], dtype=tf.float32,
                              initializer=bias_initializer, trainable=True)

        def maybe_avg(v):
            if ema is not None and not init:
                v = tf.cond(training, lambda: v, lambda: ema.average(v))
