class_docstr: `SGD <http://www.cs.toronto.edu/%7Ehinton/absps/momentum.pdf>`_ optimizer
  
  Args:
      opts: Command-line arguments
      model_params: Model parameters
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      if cls != SGDOptimizer:
          # 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.sgd.momentum",
          default=0.9,
          type=float,
          help="The value of momemtum in SGD. Defaults to 0.9",
      )
      group.add_argument(
          "--optim.sgd.nesterov",
          action="store_true",
          default=False,
          help="Use nesterov momentum in SGD. Defaults to False.",
      )
      return parser
  
file_path: ml-cvnets/optim/sgd.py
imports: import argparse
  from typing import Dict, Iterable, Union
  from torch import Tensor
  from torch.optim import SGD
  from optim import OPTIM_REGISTRY
  from optim.base_optim import BaseOptim
label_desc: Use image node_id 2 for calling the SGDOptimizer obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser