code: def __init__(
      self,
      logit_scale_init: float = 1 / 0.07,
      learnable: bool = True,
      max_logit_scale: float = 100,
  ) -> None:
      super().__init__()
      self.max_logit_scale = max_logit_scale
      self.logit_scale_init = logit_scale_init
      self.learnable = learnable
      log_logit_scale = torch.ones([]) * np.log(self.logit_scale_init)
      if learnable:
          self.log_logit_scale = nn.Parameter(log_logit_scale)
      else:
          self.register_buffer("log_logit_scale", log_logit_scale)
  
imports: import einops
  import numpy
  import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new LearnableLogitScaling object from inherited base classes: nn with example: obj = LearnableLogitScaling(logit_scale_init, learnable, max_logit_scale)