code: def general_conv(x,
                   num_filters=64,
                   filter_size=7,
                   stride=1,
                   stddev=0.02,
                   padding="VALID",
                   name="conv",
                   do_norm="instance",
                   do_relu=True,
                   relufactor=0):
    
    with tf.variable_scope(name):
      x = layers().Conv2D(
          num_filters,
          filter_size,
          stride,
          padding,
          activation=None,
          kernel_initializer=tf.truncated_normal_initializer(stddev=stddev),
          bias_initializer=tf.constant_initializer(0.0))(x)
      if do_norm == "layer":
        x = layer_norm(x)
      elif do_norm == "instance":
        x = instance_norm(x)
  
      if do_relu:
        if relufactor == 0:
          x = tf.nn.relu(x, "relu")
        else:
          x = lrelu(x, leak=relufactor)
  
      return x
docs: Generalized convolution layer.