class_docstr: Implements AccSGD algorithm.
  
  It has been proposed in `On the insufficiency of existing momentum
  schemes for Stochastic Optimization`__ and  `Accelerating Stochastic
  Gradient Descent For Least Squares Regression`__
  
  Arguments:
      params: iterable of parameters to optimize or dicts defining
          parameter groups
      lr: learning rate (default: 1e-3)
      kappa: ratio of long to short step (default: 1000)
      xi: statistical advantage parameter (default: 10)
      small_const: any value <=1 (default: 0.7)
      weight_decay: weight decay (L2 penalty) (default: 0)
  
  Example:
      >>> import torch_optimizer as optim
      >>> optimizer = optim.AccSGD(model.parameters(), lr=0.1)
      >>> optimizer.zero_grad()
      >>> loss_fn(model(input), target).backward()
      >>> optimizer.step()
  
   __ https://arxiv.org/abs/1704.08227
   __ https://arxiv.org/abs/1803.05591
  
  Note:
      Reference code: https://github.com/rahulkidambi/AccSGD
code: def __init__(
      self,
      params: Params,
      lr: float = 1e-3,
      kappa: float = 1000.0,
      xi: float = 10.0,
      small_const: float = 0.7,
      weight_decay: float = 0,
  ) -> None:
      if lr <= 0.0:
          raise ValueError("Invalid learning rate: {}".format(lr))
      if weight_decay < 0:
          raise ValueError(
              "Invalid weight_decay value: {}".format(weight_decay)
          )
      defaults = dict(
          lr=lr,
          kappa=kappa,
          xi=xi,
          small_const=small_const,
          weight_decay=weight_decay,
      )
      super(AccSGD, self).__init__(params, defaults)
  
imports: import copy
  from torch.optim.optimizer import Optimizer
  from .types import OptFloat, OptLossClosure, Params
label_desc: Use image node_id 1 to create a new AccSGD object from inherited base classes: Optimizer with example: obj = AccSGD(params, lr, kappa, xi, small_const, weight_decay)