class_docstr: LoRA incorporated in 2d-Convolutional Layer. Weights of convolutional layer are set to be frozen per default.
  
  Parameters
  ----------
  in_channels
       Number of channels in the input image.
  out_channels
      Number of channels produced by the convolution.
  kernel_size
      Size of the convolving kernel.
  r
      rank r of the low-rank decomposition.
  lora_alpha
      Scaling factor. Can be simply set to same value as r as initialization is scaled already.
  lora_dropout
      Adding dropout to LoRA.
  merge_weights
      Merging weights during inference to reduce latency.
  
  References
  ----------
  1. Edward J. Hu*, Yelong Shen*, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen,
  "LoRA: Low-Rank Adaptation of Large Language Models", 2021
  https://arxiv.org/abs/2106.09685
  2. Code: https://github.com/microsoft/LoRA
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      kernel_size: int,
      r: int = 0,
      lora_alpha: int = 1,
      lora_dropout: float = 0.0,
      merge_weights: bool = True,
      **kwargs,
  ):
      nn.Conv2d.__init__(
          self, in_channels, out_channels, kernel_size, **kwargs
      )
      LoRALayer.__init__(
          self,
          r=r,
          lora_alpha=lora_alpha,
          lora_dropout=lora_dropout,
          merge_weights=merge_weights,
      )
      assert type(kernel_size) is int
      # Actual trainable parameters
      if r > 0:
          self.lora_A = nn.Parameter(
              self.weight.new_zeros(
                  (r * kernel_size, in_channels * kernel_size)
              )
          )
          self.lora_B = nn.Parameter(
              self.weight.new_zeros(
                  (out_channels * kernel_size, r * kernel_size)
              )
          )
          self.scaling = self.lora_alpha / self.r
          # Freezing the pre-trained weight matrix
          self.weight.requires_grad = False
      self.reset_parameters()
  
imports: import math
  from typing import List
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new LoRAConv2d object from inherited base classes: nn, LoRALayer with example: obj = LoRAConv2d(in_channels, out_channels, kernel_size, r, lora_alpha, lora_dropout, merge_weights)