class_docstr: `AdamW <https://arxiv.org/abs/1711.05101>`_ optimizer
  
  Args:
      opts: Command-line arguments
      model_params: Model parameters
docstr: Add arguments for AdamW optimizer
docstr_tok: ["Add","arguments","for","AdamW","optimizer"]
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      """Add arguments for AdamW optimizer"""
      if cls != AdamWOptimizer:
          # 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.adamw.beta1",
          type=float,
          default=0.9,
          help="Value of Beta1 in AdamW optimizer. Defaults to 0.9.",
      )
      group.add_argument(
          "--optim.adamw.beta2",
          type=float,
          default=0.98,
          help="Value of Beta2 in AdamW optimizer. Defaults to 0.98.",
      )
      group.add_argument(
          "--optim.adamw.amsgrad",
          action="store_true",
          default=False,
          help="Use AMSGrad in AdamW. Defaults to False.",
      )
      group.add_argument(
          "--optim.adamw.eps",
          type=float,
          default=None,
          help="Value of epsilon in AdamW optimizer. Defaults to None."
          "When this value is None, the default value in base optimizer is used.",
      )
      return parser
  
file_path: ml-cvnets/optim/adamw.py
imports: import argparse
  from typing import Dict, Iterable, Union
  from torch import Tensor
  from torch.optim import AdamW
  from optim import OPTIM_REGISTRY
  from optim.base_optim import BaseOptim
label_desc: Use image node_id 2 for calling the AdamWOptimizer obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser