class_docstr: multi-positive targets cross entropy loss.
  
  Args:
      reduction (str, optional): The method to reduce the loss.
          Options are "none", "mean" and "sum". Defaults to "mean".
      loss_weight (float, optional): The weight of loss. Defaults to 1.0.
docstr: Forward function.
  
  Args:
      cls_score (torch.Tensor): The classification score.
      label (torch.Tensor): The assigned label of the prediction.
      weight (torch.Tensor): The element-wise weight.
      avg_factor (float): Average factor when computing
          the mean of losses.
      reduction_override (str): Same as built-in losses of PyTorch.
  
  Returns:
      torch.Tensor: Calculated loss
docstr_tok: ["Forward","function",".","Args",":","cls_score","(","torch.Tensor",")",":","The","classification","score",".","label","(","torch.Tensor",")",":","The","assigned","label","of","the","prediction",".","weight","(","torch.Tensor",")",":","The","element-wise","weight",".","avg_factor","(","float",")",":","Average","factor","when","computing","the","mean","of","losses",".","reduction_override","(","str",")",":","Same","as","built-in","losses","of","PyTorch",".","Returns",":","torch.Tensor",":","Calculated","loss"]
code: def forward(
      self,
      cls_score: Tensor,
      label: Tensor,
      weight: Optional[Tensor] = None,
      avg_factor: Optional[float] = None,
      reduction_override: Optional[str] = None,
      **kwargs,
  ) -> Tensor:
      """Forward function.
  
      Args:
          cls_score (torch.Tensor): The classification score.
          label (torch.Tensor): The assigned label of the prediction.
          weight (torch.Tensor): The element-wise weight.
          avg_factor (float): Average factor when computing
              the mean of losses.
          reduction_override (str): Same as built-in losses of PyTorch.
  
      Returns:
          torch.Tensor: Calculated loss
      """
      assert cls_score.size() == label.size()
      assert reduction_override in (None, "none", "mean", "sum")
      reduction = (
          reduction_override if reduction_override else self.reduction
      )
      loss_cls = self.loss_weight * self.multi_pos_cross_entropy(
          cls_score,
          label,
          weight,
          reduction=reduction,
          avg_factor=avg_factor,
      )
      return loss_cls
  
file_path: mmdetection/mmdet/models/losses/multipos_cross_entropy_loss.py
imports: from typing import Optional
  import torch
  from mmengine.model import BaseModule
  from torch import Tensor
  from mmdet.registry import MODELS
  from .utils import weight_reduce_loss
label_desc: Use image node_id 3 for calling the MultiPosCrossEntropyLoss obj's underlying member method code with example usage: obj.forward(cls_score, label, weight, avg_factor, reduction_override) and returns: loss_cls