class_docstr: Binary cross-entropy loss for classification tasks
  
  Args:
      opts: command-line arguments
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      if cls != BinaryCrossEntropy:
          # Don't re-register arguments in subclasses that don't override `add_arguments()`.
          return parser
  
      group = parser.add_argument_group(cls.__name__)
      group.add_argument(
          "--loss.classification.binary-cross-entropy.reduction",
          type=str,
          default="mean",
          choices=["sum", "mean", "none", "batch_mean"],
          help="Specifies the reduction to apply to the output (default='mean')."
          " 'batch_mean' divides the sum of the loss only by the first dimension.",
      )
      return parser
  
file_path: ml-cvnets/loss_fn/classification/binary_cross_entropy.py
imports: import argparse
  from torch import Tensor
  from torch.nn import functional
  from loss_fn import LOSS_REGISTRY
  from loss_fn.classification.base_classification_criteria import BaseClassificationCriteria
label_desc: Use image node_id 2 for calling the BinaryCrossEntropy obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser