class_docstr: Loss for single shot multi-box object detection
  
  Args:
      opts: command-line arguments
class_docstr_tok: ["Loss","for","single","shot","multi-box","object","detection","Args",":","opts",":","command-line","arguments"]
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      if cls != SSDLoss:
          # Don't re-register arguments in subclasses that don't override `add_arguments()`.
          return parser
  
      group = parser.add_argument_group(title=cls.__name__)
      group.add_argument(
          "--loss.detection.ssd-multibox-loss.neg-pos-ratio",
          type=int,
          default=3,
          help=f"Negative positive ratio in {cls.__name__}. Defaults to 3.",
      )
      group.add_argument(
          "--loss.detection.ssd-multibox-loss.max-monitor-iter",
          type=int,
          default=-1,
          help=f"Number of iterations for monitoring location and "
          f"classification loss in {cls.__name__}. -1 means do not monitor. "
          f"Defaults to -1.",
      )
      group.add_argument(
          "--loss.detection.ssd-multibox-loss.update-wt-freq",
          type=int,
          default=200,
          help=f"Update the weights after N number of iterations in {cls.__name__}. "
          f"Defaults to 200 iterations.",
      )
      group.add_argument(
          "--loss.detection.ssd-multibox-loss.label-smoothing",
          type=float,
          default=0.0,
          help=f"Specifies the amount of smoothing when computing the classification loss in {cls.__name__}, "
          f"where 0.0 means no smoothing. Defaults to 0.0.",
      )
      return parser
  
file_path: ml-cvnets/loss_fn/detection/ssd_multibox_loss.py
imports: import argparse
  from typing import Any, Dict
  import torch
  from torch import Tensor
  from torch.nn import functional
  from cvnets.misc.third_party.ssd_utils import hard_negative_mining
  from loss_fn import LOSS_REGISTRY
  from loss_fn.detection.base_detection_criteria import BaseDetectionCriteria
  from utils import logger
  from utils.ddp_utils import is_master
  from utils.tensor_utils import tensor_to_python_float
label_desc: Use image node_id 3 for calling the SSDLoss obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser