code: def conv2d(
      input_tensor,
      output_dim,
      kernel_size=(3, 3),
      stride_size=(2, 2),
      initializer_std=0.02,
      padding="SAME",
      name="conv2d",
  ):
      with tf.variable_scope(name):
          w = tf.get_variable(
              "w",
              [
                  kernel_size[0],
                  kernel_size[1],
                  input_tensor.get_shape()[-1],
                  output_dim,
              ],
              initializer=tf.truncated_normal_initializer(
                  stddev=initializer_std
              ),
          )
  
          if padding == "OTHER":
              padding = "VALID"
              input_tensor = tf.pad(
                  input_tensor,
                  [[0, 0], [3, 3], [3, 3], [0, 0]],
                  "CONSTANT",
              )
  
          elif padding == "VALID":
              padding = "VALID"
  
          conv = tf.nn.conv2d(
              input_tensor,
              w,
              strides=[1, stride_size[0], stride_size[1], 1],
              padding=padding,
          )
          biases = tf.get_variable(
              "biases",
              [output_dim],
              initializer=tf.constant_initializer(0.0),
          )
          conv = tf.nn.bias_add(conv, biases)
  
          return conv
  
imports: import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: conv2d(input_tensor, output_dim, kernel_size, stride_size, initializer_std, padding, name) and returns: conv