class_docstr: MSELoss.
  
  Args:
      reduction (str, optional): The method that reduces the loss to a
          scalar. Options are "none", "mean" and "sum".
      loss_weight (float, optional): The weight of the loss. Defaults to 1.0
docstr: Forward function of loss.
  
  Args:
      pred (torch.Tensor): The prediction.
      target (torch.Tensor): The learning target of the prediction.
      weight (torch.Tensor, optional): Weight of the loss for each
          prediction. Defaults to None.
      avg_factor (int, optional): Average factor that is used to average
          the loss. Defaults to None.
  
  Returns:
      torch.Tensor: The calculated loss
docstr_tok: ["Forward","function","of","loss",".","Args",":","pred","(","torch.Tensor",")",":","The","prediction",".","target","(","torch.Tensor",")",":","The","learning","target","of","the","prediction",".","weight","(","torch.Tensor",",","optional",")",":","Weight","of","the","loss","for","each","prediction",".","Defaults","to","None",".","avg_factor","(","int",",","optional",")",":","Average","factor","that","is","used","to","average","the","loss",".","Defaults","to","None",".","Returns",":","torch.Tensor",":","The","calculated","loss"]
code: def forward(self, pred, target, weight=None, avg_factor=None):
      """Forward function of loss.
  
      Args:
          pred (torch.Tensor): The prediction.
          target (torch.Tensor): The learning target of the prediction.
          weight (torch.Tensor, optional): Weight of the loss for each
              prediction. Defaults to None.
          avg_factor (int, optional): Average factor that is used to average
              the loss. Defaults to None.
  
      Returns:
          torch.Tensor: The calculated loss
      """
      loss = self.loss_weight * mse_loss(
          pred,
          target,
          weight,
          reduction=self.reduction,
          avg_factor=avg_factor,
      )
      return loss
  
file_path: insightface/detection/scrfd/mmdet/models/losses/mse_loss.py
imports: import torch.nn
  import torch.nn.functional
  from ..builder import LOSSES
  from .utils import weighted_loss
label_desc: Use image node_id 2 for calling the MSELoss obj's underlying member method code with example usage: obj.forward(pred, target, weight, avg_factor) and returns: loss