import tensorflow as tf

            assert size[0] % 2 == 1 and size[1] % 2 == 1, "REFLECTION PAD ONLY WORKING FOR ODD FILTER SIZE.. " + str(size)
            pad_x = size[0] // 2
            pad_y = size[1] // 2
            input = tf.pad(input, [[0, 0], [pad_x, pad_x], [pad_y, pad_y], [0, 0]], "REFLECT")
            padding = "VALID"
        
        return tf.layers.conv2d(input, channels, kernel_size=size, strides=[stride, stride],
                                padding=padding, kernel_initializer=init, name='conv' + id,
                                use_bias=use_bias, dilation_rate=(dilation, dilation))

    def z_conv(self, id, input, channels, size, stride=1, padding="SAME", use_bias=False, dilation=1):
        # zero mean conv
