class_docstr: Adam factory.
docstr: Initialize optimizer from argparse Namespace.
  
  Args:
      target: for pytorch `model.parameters()`,
          for chainer `model`
      args (argparse.Namespace): parsed command-line args
docstr_tok: ["Initialize","optimizer","from","argparse","Namespace",".","Args",":","target",":","for","pytorch","`","model.parameters","(",")","`",",","for","chainer","`","model","`","args","(","argparse.Namespace",")",":","parsed","command-line","args"]
code: def from_args(target, args: argparse.Namespace):
      """Initialize optimizer from argparse Namespace.
  
      Args:
          target: for pytorch `model.parameters()`,
              for chainer `model`
          args (argparse.Namespace): parsed command-line args
  
      """
      return torch.optim.Adam(
          target,
          lr=args.lr,
          weight_decay=args.weight_decay,
          betas=(args.beta1, args.beta2),
      )
  
file_path: espnet/espnet/optimizer/pytorch.py
imports: import argparse
  import torch
  from espnet.optimizer.factory import OptimizerFactoryInterface
  from espnet.optimizer.parser import adadelta, adam, sgd
label_desc: Use image node_id 2 for calling the AdamFactory obj's underlying member method code with example usage: obj.from_args(target, args) and returns: torch