code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      kernel_size: int,
      stride: int = 1,
      act: str = "relu",
      groups: int = 1,
  ) -> None:
      super().__init__()
      if kernel_size % 2 == 0:
          # even kernel_size -> asymmetric padding
          # PPHGNetV2 (for RT-DETR) uses kernel 2
          # follow TensorFlow/PaddlePaddle: bottom/right side is padded 1 more than top/left
          # NOTE: this does not account for stride=2
          p1 = (kernel_size - 1) // 2
          p2 = kernel_size - 1 - p1
          self.pad = nn.ZeroPad2d((p1, p2, p1, p2))
          padding = 0
      else:
          padding = (kernel_size - 1) // 2
      self.conv = nn.Conv2d(
          in_channels,
          out_channels,
          kernel_size,
          stride,
          padding,
          1,
          groups,
          False,
      )
      self.norm = nn.BatchNorm2d(out_channels)
      self.act = {
          "relu": nn.ReLU,
          "silu": nn.SiLU,
          "none": nn.Identity,
      }[act](inplace=True)
  
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from torch import nn
  from kornia.core import Module, Tensor, pad
label_desc: Use image node_id 1 to create a new ConvNormAct object from inherited base classes: nn with example: obj = ConvNormAct(in_channels, out_channels, kernel_size, stride, act, groups)