import tensorflow as tf

    '''
    Convolution 3D op wrapper, use RELU activation after convolution
    '''
    in_channels = x.get_shape()[-1].value
    with tf.variable_scope(layer_name):
        w = tf.get_variable(name='weight',
                            trainable=is_pretrain,
                            shape=[kernel_size[0],kernel_size[1],kernel_size[2],in_channels,out_channels],
                            initializer=tf.contrib.layers.xavier_initializer())
        b = tf.get_variable(name='bias',
                            trainable=is_pretrain,
                            shape=[out_channels],
                            initializer=tf.contrib.layers.xavier_initializer())
        x = tf.nn.conv3d(x, w, strides=strides, padding='SAME', data_format=data_format, name='conv3d')
        x = tf.nn.bias_add(x, b, name='bias_add')
        x = tf.nn.relu(x, name='relu')

    return x

def conv(layer_name, x, out_channels, kernel_size=[3,3], strides=[1,1,1,1], is_pretrain=True):
    '''
    Convolution op wrapper, use RELU activation after convolution
    Args:
        layer_name:
        x: input tensor
    Returns:
        4D tensor
    '''
    # x.get_shape()[-1] : Dimension(3)
    # x.get_shape()[-1].value : 3
