class_docstr: Modification of BiTemperedLogisticLoss for binary classification case.
  It's signature matches nn.BCEWithLogitsLoss: Predictions and target tensors must have shape [B,1,...]
  
  References:
      https://ai.googleblog.com/2019/08/bi-tempered-logistic-loss-for-training.html
      https://arxiv.org/abs/1906.03361
docstr: Forward method of the loss function
  
  Args:
      predictions: [B,1,...]
      targets: [B,1,...]
  
  Returns:
      Zero-sized tensor with reduced loss if self.reduction is `sum` or `mean`; Otherwise returns loss of the
      shape of `predictions` tensor.
docstr_tok: ["Forward","method","of","the","loss","function","Args",":","predictions",":","[","B,1",",","...","]","targets",":","[","B,1",",","...","]","Returns",":","Zero-sized","tensor","with","reduced","loss","if","self.reduction","is","`","sum","`","or","`","mean","`",";","Otherwise","returns","loss","of","the","shape","of","`","predictions","`","tensor","."]
code: def forward(self, predictions: Tensor, targets: Tensor) -> Tensor:
      """
      Forward method of the loss function
  
      Args:
          predictions: [B,1,...]
          targets: [B,1,...]
  
      Returns:
          Zero-sized tensor with reduced loss if self.reduction is `sum` or `mean`; Otherwise returns loss of the
          shape of `predictions` tensor.
      """
      if predictions.size(1) != 1 or targets.size(1) != 1:
          raise ValueError(
              "Channel dimension for predictions and targets must be equal to 1"
          )
  
      loss = bi_tempered_logistic_loss(
          torch.cat([-predictions, predictions], dim=1).moveaxis(1, -1),
          torch.cat([1 - targets, targets], dim=1).moveaxis(1, -1),
          t1=self.t1,
          t2=self.t2,
          label_smoothing=self.smoothing,
          reduction="none",
      ).unsqueeze(dim=1)
  
      if self.ignore_index is not None:
          mask = targets.eq(self.ignore_index)
          loss = torch.masked_fill(loss, mask, 0)
  
      if self.reduction == "mean":
          loss = loss.mean()
      elif self.reduction == "sum":
          loss = loss.sum()
      return loss
  
imports: from typing import Optional
  import torch
  from torch import nn, Tensor
label_desc: Use image node_id 2 for calling the BinaryBiTemperedLogisticLoss obj's underlying member method code with example usage: obj.forward(predictions, targets) and returns: loss