import tensorflow as tf

            else:
                if type(padding)==type(''):
                    conv = tf.nn.conv2d(x, w, stride, padding)
                else:
                    conv = tf.pad(x, padding, "CONSTANT")
                    conv = tf.nn.conv2d(conv, w, stride, padding='VALID')

            if bias != -1:
                bias = tf.get_variable('biases', [num_filters], initializer=tf.constant_initializer(bias))

                variable_summaries(bias)
                conv = tf.nn.bias_add(conv, bias)

            tf.add_to_collection('debug_layers', conv)

            return conv

    @staticmethod
    def _relu(name, x):
        with tf.variable_scope(name):
            return tf.nn.relu(x)

