class_docstr: Applies a 2D convolution over an input.
  
  Args:
      in_channels: :math:`C_{in}` from an expected input of size :math:`(N, C_{in}, H_{in}, W_{in})`.
      out_channels: :math:`C_{out}` from an expected output of size :math:`(N, C_{out}, H_{out}, W_{out})`.
      kernel_size: Kernel size for convolution.
      stride: Stride for convolution. Default: 1.
      padding: Padding for convolution. Default: 0.
      dilation: Dilation rate for convolution. Default: 1.
      groups: Number of groups in convolution. Default: 1.
      bias: Use bias. Default: ``False``.
      padding_mode: Padding mode ('zeros', 'reflect', 'replicate' or 'circular'). Default: ``zeros``.
      use_norm: Use normalization layer after convolution. Default: ``True``.
      use_act: Use activation layer after convolution (or convolution and normalization).
                              Default: ``True``.
      act_name: Use specific activation function. Overrides the one specified in command line args.
  
  Shape:
      - Input: :math:`(N, C_{in}, H_{in}, W_{in})`.
      - Output: :math:`(N, C_{out}, H_{out}, W_{out})`.
class_docstr_tok: ["Applies","a","2D","convolution","over","an","input",".","Args",":","in_channels",":",":","math",":","`","C_","{","in","}","`","from","an","expected","input","of","size",":","math",":","`","(","N",",","C_","{","in","}",",","H_","{","in","}",",","W_","{","in","}",")","`",".","out_channels",":",":","math",":","`","C_","{","out","}","`","from","an","expected","output","of","size",":","math",":","`","(","N",",","C_","{","out","}",",","H_","{","out","}",",","W_","{","out","}",")","`",".","kernel_size",":","Kernel","size","for","convolution",".","stride",":","Stride","for","convolution",".","Default",":","1.","padding",":","Padding","for","convolution",".","Default",":","0.","dilation",":","Dilation","rate","for","convolution",".","Default",":","1.","groups",":","Number","of","groups","in","convolution",".","Default",":","1.","bias",":","Use","bias",".","Default",":","``","False","``",".","padding_mode",":","Padding","mode","(","'zeros","'",",","'reflect","'",",","'replicate","'","or","'circular","'",")",".","Default",":","``","zeros","``",".","use_norm",":","Use","normalization","layer","after","convolution",".","Default",":","``","True","``",".","use_act",":","Use","activation","layer","after","convolution","(","or","convolution","and","normalization",")",".","Default",":","``","True","``",".","act_name",":","Use","specific","activation","function",".","Overrides","the","one","specified","in","command","line","args",".","Shape",":","-","Input",":",":","math",":","`","(","N",",","C_","{","in","}",",","H_","{","in","}",",","W_","{","in","}",")","`",".","-","Output",":",":","math",":","`","(","N",",","C_","{","out","}",",","H_","{","out","}",",","W_","{","out","}",")","`","."]
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      kernel_size: Union[int, Tuple[int, int]],
      stride: Optional[Union[int, Tuple[int, int]]] = 1,
      padding: Optional[Union[int, Tuple[int, int]]] = 0,
      dilation: Optional[Union[int, Tuple[int, int]]] = 1,
      groups: Optional[int] = 1,
      bias: Optional[bool] = False,
      padding_mode: Optional[str] = "zeros",
      *args,
      **kwargs,
  ) -> None:
      super().__init__(
          in_channels=in_channels,
          out_channels=out_channels,
          kernel_size=kernel_size,
          stride=stride,
          padding=padding,
          dilation=dilation,
          groups=groups,
          bias=bias,
          padding_mode=padding_mode,
      )
  
imports: import argparse
  from typing import Optional, Tuple, Type, Union
  from torch import Tensor, nn
  from cvnets.layers.activation import build_activation_layer
  from cvnets.layers.base_layer import BaseLayer
  from cvnets.layers.normalization.layer_norm import LayerNorm, LayerNorm2D_NCHW
  from cvnets.layers.normalization_layers import get_normalization_layer
  from utils import logger
label_desc: Use image node_id 1 to create a new Conv2d object from inherited base classes: nn with example: obj = Conv2d(in_channels, out_channels, kernel_size, stride, padding, dilation, groups, bias, padding_mode)