class_docstr: Overall loss function of the DRAEM model.
  
  The total loss consists of the sum of the L2 loss and Focal loss between the reconstructed image and the input
  image, and the Structural Similarity loss between the predicted and GT anomaly masks.
class_docstr_tok: ["Overall","loss","function","of","the","DRAEM","model",".","The","total","loss","consists","of","the","sum","of","the","L2","loss","and","Focal","loss","between","the","reconstructed","image","and","the","input","image",",","and","the","Structural","Similarity","loss","between","the","predicted","and","GT","anomaly","masks","."]
docstr: Compute the loss over a batch for the DRAEM model.
docstr_tok: ["Compute","the","loss","over","a","batch","for","the","DRAEM","model","."]
code: def forward(
      self,
      input_image: Tensor,
      reconstruction: Tensor,
      anomaly_mask: Tensor,
      prediction: Tensor,
  ) -> Tensor:
      """Compute the loss over a batch for the DRAEM model."""
      l2_loss_val = self.l2_loss(reconstruction, input_image)
      focal_loss_val = self.focal_loss(
          prediction, anomaly_mask.squeeze(1).long()
      )
      ssim_loss_val = self.ssim_loss(reconstruction, input_image) * 2
      return l2_loss_val + ssim_loss_val + focal_loss_val
  
imports: from kornia.losses import FocalLoss, SSIMLoss
  from torch import Tensor, nn
label_desc: Use image node_id 2 for calling the DraemLoss obj's underlying member method code with example usage: obj.forward(input_image, reconstruction, anomaly_mask, prediction) and returns: unknown