class_docstr: Implements a pure pytorch variant of FuseLAMB (NvLamb variant) optimizer from apex.optimizers.FusedLAMB
  reference: https://github.com/NVIDIA/DeepLearningExamples/blob/master/PyTorch/LanguageModeling/Transformer-XL/pytorch/lamb.py
  
  LAMB was proposed in `Large Batch Optimization for Deep Learning: Training BERT in 76 minutes`_.
  
  Arguments:
      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 norm. (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)
      grad_averaging (bool, optional): whether apply (1-beta2) to grad when
          calculating running averages of gradient. (default: True)
      max_grad_norm (float, optional): value used to clip global grad norm (default: 1.0)
      trust_clip (bool): enable LAMBC trust ratio clipping (default: False)
      always_adapt (boolean, optional): Apply adaptive learning rate to 0.0
          weight decay parameter (default: False)
  
  .. _Large Batch Optimization for Deep Learning - Training BERT in 76 minutes:
      https://arxiv.org/abs/1904.00962
  .. _On the Convergence of Adam and Beyond:
      https://openreview.net/forum?id=ryQu7f-RZ
code: def __init__(
      self,
      params,
      lr=1e-3,
      bias_correction=True,
      betas=(0.9, 0.999),
      eps=1e-6,
      weight_decay=0.01,
      grad_averaging=True,
      max_grad_norm=1.0,
      trust_clip=False,
      always_adapt=False,
  ):
      defaults = dict(
          lr=lr,
          bias_correction=bias_correction,
          betas=betas,
          eps=eps,
          weight_decay=weight_decay,
          grad_averaging=grad_averaging,
          max_grad_norm=max_grad_norm,
          trust_clip=trust_clip,
          always_adapt=always_adapt,
      )
      super().__init__(params, defaults)
  
imports: import math
  import torch
  from torch.optim import Optimizer
label_desc: Use image node_id 1 to create a new Lamb object from inherited base classes: Optimizer with example: obj = Lamb(params, lr, bias_correction, betas, eps, weight_decay, grad_averaging, max_grad_norm, trust_clip, always_adapt)