code: def __init__(
      self,
      num_classes,
      embedding_size,
      centers_per_class=10,
      la=20,
      gamma=0.1,
      margin=0.01,
      **kwargs,
  ):
      super().__init__(**kwargs)
      assert self.distance.is_inverted
      self.la = la
      self.gamma = 1.0 / gamma
      self.margin = margin
      self.num_classes = num_classes
      self.centers_per_class = centers_per_class
      self.fc = torch.nn.Parameter(
          torch.Tensor(embedding_size, num_classes * centers_per_class)
      )
      self.weight_init_func(self.fc)
      self.add_to_recordable_attributes(
          list_of_names=[
              "la",
              "gamma",
              "margin",
              "centers_per_class",
              "num_classes",
              "embedding_size",
          ],
          is_stat=False,
      )
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/losses/soft_triple_loss.py
imports: import math
  import torch
  import torch.nn.functional
  from ..distances import CosineSimilarity
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
  from .base_metric_loss_function import BaseMetricLossFunction
  from .mixins import WeightRegularizerMixin
label_desc: Use image node_id 1 to create a new SoftTripleLoss object from inherited base classes: WeightRegularizerMixin, BaseMetricLossFunction with example: obj = SoftTripleLoss(num_classes, embedding_size, centers_per_class, la, gamma, margin)