class_docstr: Expanded version of the SimCLR loss. The SimCLR loss works only on 2 positives.
  We expand the loss to work for more positives following the multi-crop
  augmentation proposed in SwAV paper. See SwAV paper https://arxiv.org/abs/2006.09882
  for the multi-crop augmentation details.
  
  Config params:
      temperature (float): the temperature to be applied on the logits
      num_crops (int): number of positives used
      buffer_params:
          world_size (int): total number of trainers in training
          embedding_dim (int): output dimensions of the features projects
          effective_batch_size (int): total batch size used (includes positives)
class_docstr_tok: ["Expanded","version","of","the","SimCLR","loss",".","The","SimCLR","loss","works","only","on","2","positives",".","We","expand","the","loss","to","work","for","more","positives","following","the","multi-crop","augmentation","proposed","in","SwAV","paper",".","See","SwAV","paper","https",":","\/\/arxiv.org\/abs\/2006.09882","for","the","multi-crop","augmentation","details",".","Config","params",":","temperature","(","float",")",":","the","temperature","to","be","applied","on","the","logits","num_crops","(","int",")",":","number","of","positives","used","buffer_params",":","world_size","(","int",")",":","total","number","of","trainers","in","training","embedding_dim","(","int",")",":","output","dimensions","of","the","features","projects","effective_batch_size","(","int",")",":","total","batch","size","used","(","includes","positives",")"]
code: def __init__(self, loss_config: AttrDict, device: str = "gpu"):
      super(SimclrInfoNCELoss, self).__init__()
  
      self.loss_config = loss_config
      # loss constants
      self.temperature = self.loss_config.temperature
      self.buffer_params = self.loss_config.buffer_params
      self.num_crops = self.loss_config.num_crops
      self.info_criterion = MultiCropSimclrInfoNCECriterion(
          self.buffer_params, self.temperature, self.num_crops
      )
  
file_path: vissl/vissl/losses/multicrop_simclr_info_nce_loss.py
imports: import logging
  import pprint
  import numpy
  import torch
  from classy_vision.losses import register_loss
  from vissl.config import AttrDict
  from vissl.losses.simclr_info_nce_loss import SimclrInfoNCECriterion, SimclrInfoNCELoss
label_desc: Use image node_id 1 to create a new MultiCropSimclrInfoNCELoss object from inherited base classes: SimclrInfoNCELoss with example: obj = MultiCropSimclrInfoNCELoss(loss_config, device)