class_docstr: Implements Adam algorithm. Currently GPU-only. Requires Apex to be installed via
  ``python setup.py install --cuda_ext --cpp_ext``.
  
  It has been proposed in `Adam: A Method for Stochastic Optimization`_.
  
  Compared to the original version in Apex, the fairseq version casts grads
  and params to FP32 internally to support ``--memory-efficient-fp16``.
  
  Args:
      params (iterable): iterable of parameters to optimize or dicts defining
          parameter groups.
      lr (float, optional): learning rate. (default: 1e-3)
      betas (Tuple[float, float], optional): coefficients used for computing
          running averages of gradient and its square. (default: (0.9, 0.999))
      eps (float, optional): term added to the denominator to improve
          numerical stability. (default: 1e-8)
      weight_decay (float, optional): weight decay (L2 penalty) (default: 0)
      amsgrad (boolean, optional): whether to use the AMSGrad variant of this
          algorithm from the paper `On the Convergence of Adam and Beyond`_
          (default: False) NOT SUPPORTED in FusedAdam!
      eps_inside_sqrt (boolean, optional): in the 'update parameters' step,
          adds eps to the bias-corrected second moment estimate before
          evaluating square root instead of adding it to the square root of
          second moment estimate as in the original paper. (default: False)
  .. _Adam: A Method for Stochastic Optimization:
      https://arxiv.org/abs/1412.6980
  .. _On the Convergence of Adam and Beyond:
      https://openreview.net/forum?id=ryQu7f-RZ
code: def supports_memory_efficient_fp16(self):
      return True
  
file_path: fairseq/fairseq/optim/fused_adam.py
imports: import types
  import torch
label_desc: Use image node_id 2 for calling the FusedAdamV1 obj's underlying member method code with example usage: obj.supports_memory_efficient_fp16() and returns: True