class_docstr: Drop-in replacement for nn.BCEWithLogitsLoss with few additions:
  - Support of ignore_index value
  - Support of label smoothing
code: def __init__(
      self,
      weight=None,
      ignore_index: Optional[int] = -100,
      reduction="mean",
      smooth_factor=None,
      pos_weight=None,
  ):
      super().__init__()
      self.ignore_index = ignore_index
      self.reduction = reduction
      self.smooth_factor = smooth_factor
      self.register_buffer("weight", weight)
      self.register_buffer("pos_weight", pos_weight)
  
imports: from typing import Optional
  import torch.nn.functional
  from torch import nn, Tensor
label_desc: Use image node_id 1 to create a new SoftBCEWithLogitsLoss object from inherited base classes: nn with example: obj = SoftBCEWithLogitsLoss(weight, ignore_index, reduction, smooth_factor, pos_weight)