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 from_exp_form(
      cls: Type[T],
      params: Params,
      lr: float = 1e-3,
      a: float = 0.1,
      k: int = 3,
      weight_decay: float = 0,
  ) -> T:
      if lr <= 0.0:
          raise ValueError("Invalid parameter k: {}".format(k))
  
      betas = [1 - a**i for i in range(k)]  # type: List[float]
      return cls(params, lr, betas, weight_decay)
  
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 2 for calling the AggMo obj's underlying member method code with example usage: obj.from_exp_form(cls, params, lr, a, k, weight_decay) and returns: cls