@classmethod
def conv(cls, in_tensor, layer_name, kernel_size, stride, out_chan, trainable=True):
    with tf.variable_scope(layer_name):
        in_size = in_tensor.get_shape().as_list()
        strides = [1, stride, stride, 1]
        kernel_shape = [kernel_size, kernel_size, in_size[3], out_chan]
        kernel = tf.get_variable('weights', kernel_shape, tf.float32, tf.contrib.layers.xavier_initializer_conv2d(), trainable=trainable, collections=['wd', 'variables', 'filters'])
        tmp_result = tf.nn.conv2d(in_tensor, kernel, strides, padding='SAME')
        biases = tf.get_variable('biases', [kernel_shape[3]], tf.float32, tf.constant_initializer(0.0001), trainable=trainable, collections=['wd', 'variables', 'biases'])
        out_tensor = tf.nn.bias_add(tmp_result, biases, name='out')
        return out_tensor
@classmethod
def conv(cls, in_tensor, layer_name, kernel_size, stride, out_chan, trainable=True):
    with tf.variable_scope(layer_name):
        in_size = in_tensor.get_shape().as_list()
        strides = [1, stride, stride, 1]
        kernel_shape = [kernel_size, kernel_size, in_size[3], out_chan]
        kernel = tf.get_variable('weights', kernel_shape, tf.float32, tf.contrib.layers.xavier_initializer_conv2d(), trainable=trainable, collections=['wd', 'variables', 'filters'])
        tmp_result = tf.nn.conv2d(in_tensor, kernel, strides, padding='SAME')
        biases = tf.get_variable('biases', [kernel_shape[3]], tf.float32, tf.constant_initializer(0.0001), trainable=trainable, collections=['wd', 'variables', 'biases'])
        out_tensor = tf.nn.bias_add(tmp_result, biases, name='out')
        return out_tensor