class_docstr: Implements Aggregated Momentum Gradient Descent.
  
  It has been proposed in `Aggregated Momentum: Stability Through Passive
  Damping`__
  
  Example:
      >>> import torch_optimizer as optim
      >>> optimizer = optim.AggMo(model.parameters(), lr=0.1)
      >>> optimizer.zero_grad()
      >>> loss_fn(model(input), target).backward()
      >>> optimizer.step()
  
   __ https://arxiv.org/abs/1804.00325
  
  Note:
      Reference code: https://github.com/AtheMathmo/AggMo/blob/master/aggmo.py  # noqa
code: def __init__(
      self,
      params: Params,
      lr: float = 1e-3,
      betas: Union[List[float], Tuple[float, ...]] = (0.0, 0.9, 0.99),
      weight_decay: float = 0,
  ) -> None:
      if lr <= 0.0:
          raise ValueError("Invalid learning rate: {}".format(lr))
  
      for i, beta in enumerate(betas):
          if not 0.0 <= beta < 1.0:
              msg = "Invalid beta parameter at index 1: {}".format(
                  betas[i]
              )
              raise ValueError(msg)
  
      if weight_decay < 0.0:
          raise ValueError(
              "Invalid weight_decay value: {}".format(weight_decay)
          )
  
      defaults = dict(lr=lr, betas=betas, weight_decay=weight_decay)
      super(AggMo, self).__init__(params, defaults)
  
file_path: pytorch-optimizer/torch_optimizer/aggmo.py
imports: from typing import List, Tuple, Type, TypeVar, Union
  import torch
  from torch.optim.optimizer import Optimizer
  from .types import OptFloat, OptLossClosure, Params
label_desc: Use image node_id 1 to create a new AggMo object from inherited base classes: Optimizer with example: obj = AggMo(params, lr, betas, weight_decay)