original_docstring: Oks loss.
  
      Computing the oks loss between a set of predicted poses and target poses.
      The loss is calculated as negative log of oks.
  
      Args:
          pred (torch.Tensor): Predicted poses of format (x1, y1, x2, y2, ...),
              shape (n, 2K).
          target (torch.Tensor): Corresponding gt poses, shape (n, 2K).
          linear (bool, optional): If True, use linear scale of loss instead of
              log scale. Default: False.
          eps (float): Eps to avoid log(0).
  
      Return:
          torch.Tensor: Loss tensor.
      
docstring: Oks loss.
  Computing the oks loss between a set of predicted poses and target poses.
  The loss is calculated as negative log of oks.
docstring_tokens: Oks loss . Computing the oks loss between a set of predicted poses and target poses . The loss is calculated as negative log of oks .
code: def oks_loss(pred,
               target,
               valid=None,
               area=None,
               linear=False,
               sigmas=None,
               eps=1e-6):
      """Oks loss.
  
      Computing the oks loss between a set of predicted poses and target poses.
      The loss is calculated as negative log of oks.
  
      Args:
          pred (torch.Tensor): Predicted poses of format (x1, y1, x2, y2, ...),
              shape (n, 2K).
          target (torch.Tensor): Corresponding gt poses, shape (n, 2K).
          linear (bool, optional): If True, use linear scale of loss instead of
              log scale. Default: False.
          eps (float): Eps to avoid log(0).
  
      Return:
          torch.Tensor: Loss tensor.
      """
      oks = oks_overlaps(pred, target, valid, area, sigmas).clamp(min=eps)
      if linear:
          loss = 1 - oks
      else:
          loss = -oks.log()
      return loss
code_tokens: def oks_loss ( pred , target , valid = None , area = None , linear = False , sigmas = None , eps = 1e-6 ) : oks = oks_overlaps ( pred , target , valid , area , sigmas ) . clamp ( min = eps ) if linear : loss = 1 - oks else : loss = - oks . log ( ) return loss
short_docstring: Oks loss.
short_docstring_tokens: Oks loss .
comment: """Oks loss.
  
      Computing the oks loss between a set of predicted poses and target poses.
      The loss is calculated as negative log of oks.
  
      Args:
          pred (torch.Tensor): Predicted poses of format (x1, y1, x2, y2, ...),
              shape (n, 2K).
          target (torch.Tensor): Corresponding gt poses, shape (n, 2K).
          linear (bool, optional): If True, use linear scale of loss instead of
              log scale. Default: False.
          eps (float): Eps to avoid log(0).
  
      Return:
          torch.Tensor: Loss tensor.
      """