class_docstr: LARS for PyTorch
  
  Paper: `Large batch training of Convolutional Networks` - https://arxiv.org/pdf/1708.03888.pdf
  
  Args:
      params (iterable): iterable of parameters to optimize or dicts defining parameter groups.
      lr (float, optional): learning rate (default: 1.0).
      momentum (float, optional): momentum factor (default: 0)
      weight_decay (float, optional): weight decay (L2 penalty) (default: 0)
      dampening (float, optional): dampening for momentum (default: 0)
      nesterov (bool, optional): enables Nesterov momentum (default: False)
      trust_coeff (float): trust coefficient for computing adaptive lr / trust_ratio (default: 0.001)
      eps (float): eps for division denominator (default: 1e-8)
      trust_clip (bool): enable LARC trust ratio clipping (default: False)
      always_adapt (bool): always apply LARS LR adapt, otherwise only when group weight_decay != 0 (default: False)
code: def __init__(
      self,
      params,
      lr=1.0,
      momentum=0,
      dampening=0,
      weight_decay=0,
      nesterov=False,
      trust_coeff=0.001,
      eps=1e-8,
      trust_clip=False,
      always_adapt=False,
  ):
      if lr < 0.0:
          raise ValueError(f"Invalid learning rate: {lr}")
      if momentum < 0.0:
          raise ValueError(f"Invalid momentum value: {momentum}")
      if weight_decay < 0.0:
          raise ValueError(
              f"Invalid weight_decay value: {weight_decay}"
          )
      if nesterov and (momentum <= 0 or dampening != 0):
          raise ValueError(
              "Nesterov momentum requires a momentum and zero dampening"
          )
  
      defaults = dict(
          lr=lr,
          momentum=momentum,
          dampening=dampening,
          weight_decay=weight_decay,
          nesterov=nesterov,
          trust_coeff=trust_coeff,
          eps=eps,
          trust_clip=trust_clip,
          always_adapt=always_adapt,
      )
      super().__init__(params, defaults)
  
imports: import torch
  from torch.optim.optimizer import Optimizer
label_desc: Use image node_id 1 to create a new Lars object from inherited base classes: Optimizer with example: obj = Lars(params, lr, momentum, dampening, weight_decay, nesterov, trust_coeff, eps, trust_clip, always_adapt)