class_docstr: Implements A2GradInc Optimizer Algorithm.
  
  It has been proposed in `Optimal Adaptive and Accelerated Stochastic
  Gradient Descent`__.
  
  Arguments:
      params: iterable of parameters to optimize or dicts defining
          parameter groups
      lr: not used for this optimizer (default: None)
      beta:  (default: 10)
      lips: Lipschitz constant (default: 10)
  
  
  Example:
      >>> import torch_optimizer as optim
      >>> optimizer = optim.A2GradInc(model.parameters(), lips=10)
      >>> optimizer.zero_grad()
      >>> loss_fn(model(input), target).backward()
      >>> optimizer.step()
  
  __ https://arxiv.org/abs/1810.00553
  
  Note:
      Reference code: https://github.com/severilov/A2Grad_optimizer
class_docstr_tok: ["Implements","A2GradInc","Optimizer","Algorithm",".","It","has","been","proposed","in","`","Optimal","Adaptive","and","Accelerated","Stochastic","Gradient","Descent","`","__",".","Arguments",":","params",":","iterable","of","parameters","to","optimize","or","dicts","defining","parameter","groups","lr",":","not","used","for","this","optimizer","(","default",":","None",")","beta",":","(","default",":","10",")","lips",":","Lipschitz","constant","(","default",":","10",")","Example",":",">",">",">","import","torch_optimizer","as","optim",">",">",">","optimizer","=","optim.A2GradInc","(","model.parameters","(",")",",","lips=10",")",">",">",">","optimizer.zero_grad","(",")",">",">",">","loss_fn","(","model","(","input",")",",","target",")",".backward","(",")",">",">",">","optimizer.step","(",")","__","https",":","\/\/arxiv.org\/abs\/1810.00553","Note",":","Reference","code",":","https",":","\/\/github.com\/severilov\/A2Grad_optimizer"]
code: def __init__(
      self,
      params: Params,
      lr: Optional[float] = None,
      beta: float = 10,
      lips: float = 10,
  ):
      if beta < 0.0:
          raise ValueError("Invalid beta value: {}".format(beta))
      if lips < 0.0:
          raise ValueError(
              "Invalid weight_decay value: {}".format(lips)
          )
      defaults = dict(beta=beta, lips=lips, lr=lr)
      super(A2GradInc, self).__init__(params, defaults)
  
file_path: pytorch-optimizer/torch_optimizer/a2grad.py
imports: import copy
  import math
  from typing import Optional
  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 A2GradInc object from inherited base classes: Optimizer with example: obj = A2GradInc(params, lr, beta, lips)