code: def negative_mises_fisher_weights(
      out0: Tensor, out1: Tensor, sigma: float = 0.5
  ) -> torch.Tensor:
      """Negative Mises-Fisher weighting function as presented in Decoupled
      Contrastive Learning [0].
  
      The implementation was inspired by [1].
  
      - [0] Chun-Hsiao Y. et. al., 2021, Decoupled Contrastive Learning https://arxiv.org/abs/2110.06848
      - [1] https://github.com/raminnakhli/Decoupled-Contrastive-Learning
  
      Args:
          out0:
              Output projections of the first set of transformed images.
              Shape: (batch_size, embedding_size)
          out1:
              Output projections of the second set of transformed images.
              Shape: (batch_size, embedding_size)
          sigma:
              Similarities are scaled by inverse sigma.
      Returns:
          A tensor with shape (batch_size,) where each entry is the weight for one
          of the input images.
  
      """
      similarity = (
          torch.einsum("nm,nm->n", out0.detach(), out1.detach()) / sigma
      )
      return 2 - out0.shape[0] * nn.functional.softmax(
          similarity, dim=0
      )
  
file_path: lightly/lightly/loss/dcl_loss.py
imports: from functools import partial
  from typing import Callable, Optional
  import torch
  from torch import Tensor
  from torch import distributed
  from torch import nn
  from lightly.utils import dist
label_desc: Use image node_id 1 for calling a global function with example usage: negative_mises_fisher_weights(out0, out1, sigma) and returns: unknown