import tensorflow as tf

            
            if do_norm:
                conv = tf.layers.batch_normalization(conv, momentum=0.9)
            
            if activation_function == "relu":
                conv = tf.nn.relu(conv, name = 'relu')
            if activation_function == "leakyrelu":
                conv = tf.nn.leaky_relu(conv, alpha=relu_factor)
            if activation_function == "elu":
                conv = tf.nn.elu(conv, name = 'elu')
            
            return conv
    def general_deconv2d(self, input_data, filters = 64, kernel_size = 7, stride = 1, stddev = 0.02, activation_function = "relu", padding = "VALID", do_norm = True, relu_factor = 0, name="deconv2d"):
        with tf.variable_scope(name):
            deconv = tf.layers.conv2d_transpose(input_data, filters, kernel_size, (stride, stride), padding, activation = None)
            
            if do_norm:
                deconv = tf.layers.batch_normalization(deconv, momentum = 0.9)
