code: def parse_conv2d_layer(
      operation,
      layer_name,
      input_names,
      input_shapes,
      node,
      class_object,
      data_reader,
      config,
  ):
      assert "Conv2d" in operation
  
      layer = {}
  
      layer["name"] = layer_name
      layer["inputs"] = input_names
      layer["class_name"] = "Conv2D"
      layer[
          "data_format"
      ] = "channels_first"  # Pytorch default (can't change)
  
      layer["weight_data"] = class_object.weight.data.numpy()
      if class_object.bias is not None:
          layer["bias_data"] = class_object.bias.data.numpy()
      else:
          layer["bias_data"] = None
  
      # Input info
      (
          layer["in_height"],
          layer["in_width"],
          layer["n_chan"],
      ) = parse_data_format(
          input_shapes[0], "channels_first"
      )  # Keras's default is channels_last
  
      # Additional parameters
      layer["n_filt"] = class_object.out_channels
      layer["filt_height"] = class_object.kernel_size[0]
      layer["filt_width"] = class_object.kernel_size[1]
      layer["stride_height"] = class_object.stride[0]
      layer["stride_width"] = class_object.stride[1]
      layer["dilation"] = class_object.dilation[0]
      layer["pad_top"] = layer["pad_bottom"] = class_object.padding[0]
      layer["pad_left"] = layer["pad_right"] = class_object.padding[1]
  
      if all(
          x == 0 for x in class_object.padding
      ):  # No padding, i.e., 'VALID' padding in Keras/Tensorflow
          layer["padding"] = "valid"
      else:  # Only 'valid' and 'same' padding are available in Keras
          layer["padding"] = "same"
  
      # Ouput info
      (
          layer["out_height"],
          layer["out_width"],
          _,
          _,
          _,
          _,
      ) = compute_padding_2d_pytorch(
          class_object.padding,
          layer["in_height"],
          layer["in_width"],
          layer["stride_height"],
          layer["stride_width"],
          layer["filt_height"],
          layer["filt_width"],
          class_object.dilation[0],
          class_object.dilation[1],
      )
  
      output_shape = [
          input_shapes[0][0],
          layer["n_filt"],
          layer["out_height"],
          layer["out_width"],
      ]
  
      return layer, output_shape
  
label_desc: Use image node_id 2 for calling a global function with example usage: parse_conv2d_layer(operation, layer_name, input_names, input_shapes, node, class_object, data_reader, config) and returns: layer,  output_shape