import tensorflow as tf

    with tf.variable_scope(name):
        W = get_variable("W", shape=[size, size, in_channels, out_channels], dtype=tf.float32,
                         initializer=initializer, regularizer=tf.nn.l2_loss)
        b = get_variable("b", shape=[1, 1, 1, out_channels], dtype=tf.float32,
                         initializer=tf.zeros_initializer(),trainable=bias)
        
        if dilation:
            assert(strides == [1, 1, 1, 1])
            out = tf.add(tf.nn.atrous_conv2d(inp, W, rate=dilation, padding=padding), b, name='convolution')
            out.set_shape([batch_size, res1, res2, out_channels])
        else:
            out = tf.add(tf.nn.conv2d(inp, W, strides=strides, padding=padding), b, name='convolution')
        
        if apply_relu:
            out = relu(out, alpha=alpha, name='relu')
    
