class_docstr: Contrastive Model, currently mainly focused on memory bank and CSC.
class_docstr_tok: ["Contrastive","Model",",","currently","mainly","focused","on","memory","bank","and","CSC","."]
code: def get_code(self, out):
      with torch.no_grad():
          Q = torch.exp(out / self.swav_eps_sinkhorn)  # BxK
          if self.cfg.NUM_SHARDS > 1:
              Q_sink = self.distributed_sinkhorn(Q.t(), 3)  # BxK
          else:
              Q_sink = self.sinkhorn(Q, 3)  # BxK
      return Q_sink
  
imports: import math
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import slowfast.models.losses
  import slowfast.utils.distributed
  import slowfast.utils.logging
  from slowfast.models.video_model_builder import X3D, MViT, ResNet, SlowFast
  from .build import MODEL_REGISTRY
label_desc: Use image node_id 16 for calling the ContrastiveModel obj's underlying member method code with example usage: obj.get_code(out) and returns: Q_sink