import tensorflow as tf

            g = maybe_avg(g)
            b = maybe_avg(b)

            W = tf.reshape(g, [1, 1, num_filters, 1]) * tf.nn.l2_normalize(V, [0, 1, 3])
            # calculate convolutional layer output
            x = tf.nn.conv2d_transpose(x, W, target_shape, [1] + list(stride) + [1], padding=pad)
