class_docstr: Overall loss function of the third training phase of the DSR model.
  
  The loss consists of a focal loss between the computed segmentation mask and the ground truth mask.
docstr: Compute the loss over a batch for the DSR model.
  
  Args:
      gen_mask (Tensor): Computed anomaly map
      anomaly_mask (Tensor): Ground truth anomaly map
  
  Returns:
      Tensor: Total loss
code: def forward(self, pred_mask: Tensor, true_mask: Tensor) -> Tensor:
      """Compute the loss over a batch for the DSR model.
  
      Args:
          gen_mask (Tensor): Computed anomaly map
          anomaly_mask (Tensor): Ground truth anomaly map
  
      Returns:
          Tensor: Total loss
      """
      focal_loss = self.focal_loss(
          pred_mask, true_mask.squeeze(1).long()
      )
      return focal_loss
  
file_path: anomalib/src/anomalib/models/dsr/loss.py
imports: from kornia.losses import FocalLoss
  from torch import Tensor, nn
label_desc: Use image node_id 2 for calling the DsrThirdStageLoss obj's underlying member method code with example usage: obj.forward(pred_mask, true_mask) and returns: focal_loss