code: def __init__(
      self,
      regular_linear_layer,
      lora_scale=1,
      network_alpha=None,
      rank=4,
      dtype=None,
  ):
      super().__init__()
      from ..models.lora import LoRALinearLayer
  
      self.regular_linear_layer = regular_linear_layer
  
      device = self.regular_linear_layer.weight.device
  
      if dtype is None:
          dtype = self.regular_linear_layer.weight.dtype
  
      self.lora_linear_layer = LoRALinearLayer(
          self.regular_linear_layer.in_features,
          self.regular_linear_layer.out_features,
          network_alpha=network_alpha,
          device=device,
          dtype=dtype,
          rank=rank,
      )
  
      self.lora_scale = lora_scale
  
imports: from typing import Optional, Tuple, Union
  import torch
  import torch.nn.functional
  from torch import nn
  from ..utils import logging
  from ..utils.import_utils import is_transformers_available
label_desc: Use image node_id 1 to create a new PatchedLoraProjection object from inherited base classes: torch.nn with example: obj = PatchedLoraProjection(regular_linear_layer, lora_scale, network_alpha, rank, dtype)