class_docstr: Implementation of  Dual-Path Convolutional Image-Text Embeddings with Instance Loss, ACM TOMM 2020
  https://arxiv.org/abs/1711.05535
  using cross-entropy loss for every sample if label is not available, else use given label.
code: def __init__(self, gamma=64, **kwargs):
      super().__init__(**kwargs)
      c_f.assert_distance_type(self, CosineSimilarity)
      self.gamma = gamma
      self.add_to_recordable_attributes(
          list_of_names=["gamma"],
          is_stat=False,
      )
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/losses/instance_loss.py
imports: import torch
  import torch.nn.functional
  from ..distances import CosineSimilarity
  from ..reducers import MeanReducer
  from ..utils import common_functions
  from .base_metric_loss_function import BaseMetricLossFunction
label_desc: Use image node_id 1 to create a new InstanceLoss object from inherited base classes: BaseMetricLossFunction with example: obj = InstanceLoss(gamma)