class_docstr: Basicly the same with L1BalanceCELoss, where the bce loss map is used as
      attention weigts for DiceLoss
code: def forward(self, pred, batch):
      bce_loss, bce_map = self.bce_loss(
          pred["binary"], batch["gt"], batch["mask"], return_origin=True
      )
      l1_loss, l1_metric = self.l1_loss(
          pred["thresh"], batch["thresh_map"], batch["thresh_mask"]
      )
      bce_map = (bce_map - bce_map.min()) / (
          bce_map.max() - bce_map.min()
      )
      dice_loss = self.dice_loss(
          pred["thresh_binary"],
          batch["gt"],
          batch["mask"],
          weights=bce_map + 1,
      )
      metrics = dict(bce_loss=bce_loss)
      metrics["thresh_loss"] = dice_loss
      loss = (
          dice_loss
          + self.l1_scale * l1_loss
          + bce_loss * self.bce_scale
      )
      metrics.update(**l1_metric)
      return loss, metrics
  
imports: import sys
  import torch
  import torch.nn
label_desc: Use image node_id 2 for calling the L1BCEMiningLoss obj's underlying member method code with example usage: obj.forward(pred, batch) and returns: loss,  metrics