class_docstr: Wrapper around the loss of IBOT (https://arxiv.org/pdf/2111.07832.pdf)
  
  Allows to feed the correct configuration to IBOTCriterion class (below)
  which implement the IBOT loss entirely decoupled from VISSL
code: def __init__(self, loss_config: AttrDict):
      super().__init__()
  
      # iBOT criterion
      self.num_global_crops = loss_config["num_global_crops"]
      self.criterion = iBOTCriterion(
          out_dim=loss_config["out_dim"],
          patch_out_dim=loss_config["patch_out_dim"],
          ngcrops=self.num_global_crops,
          nlcrops=loss_config["num_local_crops"],
          warmup_teacher_temp=loss_config["warmup_teacher_temp"],
          teacher_temp=loss_config["teacher_temp"],
          warmup_teacher_temp2=loss_config["warmup_teacher_patch_temp"],
          teacher_temp2=loss_config["teacher_patch_temp"],
          warmup_teacher_temp_epochs=loss_config[
              "warmup_teacher_temp_epochs"
          ],
          nepochs=loss_config["num_epochs"],
          student_temp=loss_config["student_temp"],
          center_momentum=loss_config["center_momentum"],
          center_momentum2=loss_config["center_momentum2"],
          lambda1=loss_config["lambda1"],
          lambda2=loss_config["lambda2"],
          mim_start_epoch=loss_config["mim_start_epoch"],
      )
  
      # Attributes needed for the Hook
      self.current_epoch = 0
      self.teacher_momentum = loss_config["teacher_momentum"]
  
      # Momentum teacher related attributes
      self.momentum_teacher = None
      self.checkpoint = None
      self.teacher_output = None
      self.teacher_temp = None
  
imports: import logging
  import pprint
  from typing import List
  import numpy
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  from classy_vision.losses import ClassyLoss, register_loss
  from fairscale.nn import FullyShardedDataParallel
  from vissl.config import AttrDict
  from vissl.models.model_helpers import get_no_ddp_model
  from vissl.utils.distributed_utils import concat_all_gather
label_desc: Use image node_id 1 to create a new IBOTLoss object from inherited base classes: ClassyLoss with example: obj = IBOTLoss(loss_config)