class_docstr: Base class for optimizer
  
  Args:
      opts: Command-line arguments
class_docstr_tok: ["Base","class","for","optimizer","Args",":","opts",":","Command-line","arguments"]
docstr: Add optimizer arguments
docstr_tok: ["Add","optimizer","arguments"]
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      """Add optimizer arguments"""
      if cls != BaseOptim:
          # 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(
          "--optim.name",
          type=str,
          default="sgd",
          help="Name of the optimizer. Defaults to SGD.",
      )
      group.add_argument(
          "--optim.eps",
          type=float,
          default=1e-8,
          help="Optimizer epsilon value. Defaults to 1.e-8.",
      )
      group.add_argument(
          "--optim.weight-decay",
          default=4e-5,
          type=float,
          help="Weight decay (or L2 penalty). Defaults to 4.e-5.",
      )
      group.add_argument(
          "--optim.no-decay-bn-filter-bias",
          action="store_true",
          default=False,
          help="When enabled, the weight in normalization layers and biases in the model are not decayed."
          "Defaults to False.",
      )
      group.add_argument(
          "--optim.bypass-parameters-check",
          action="store_true",
          default=False,
          help="Bypass parameter check when creating optimizer. Defaults to False",
      )
      return parser
  
imports: import argparse
  from utils import logger
label_desc: Use image node_id 2 for calling the BaseOptim obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser