class_docstr: Layerwise adaptive rate scaling (LARS) optimizer.
  
  See https://arxiv.org/abs/1708.03888
class_docstr_tok: ["Layerwise","adaptive","rate","scaling","(","LARS",")","optimizer",".","See","https",":","\/\/arxiv.org\/abs\/1708.03888"]
docstr: Constructor for LARS optimizer.
  
  Args:
      vc: collection of variables to optimize.
      momentum: coefficient used for the moving average of the gradient.
      weight_decay: weight decay coefficient.
      tc: trust coefficient eta ( < 1) for trust ratio computation.
      eps: epsilon used for trust ratio computation.
docstr_tok: ["Constructor","for","LARS","optimizer",".","Args",":","vc",":","collection","of","variables","to","optimize",".","momentum",":","coefficient","used","for","the","moving","average","of","the","gradient",".","weight_decay",":","weight","decay","coefficient",".","tc",":","trust","coefficient","eta","(","<","1",")","for","trust","ratio","computation",".","eps",":","epsilon","used","for","trust","ratio","computation","."]
code: def __init__(
      self,
      vc: VarCollection,
      momentum: float = 0.9,
      weight_decay: float = 1e-4,
      tc: float = 1e-3,
      eps: float = 1e-5,
  ):
      """Constructor for LARS optimizer.
  
      Args:
          vc: collection of variables to optimize.
          momentum: coefficient used for the moving average of the gradient.
          weight_decay: weight decay coefficient.
          tc: trust coefficient eta ( < 1) for trust ratio computation.
          eps: epsilon used for trust ratio computation.
      """
      self.momentum = momentum
      self.weight_decay = weight_decay
      self.tc = tc
      self.eps = eps
      self.train_vars = ModuleList(
          TrainRef(x) for x in vc.subset(TrainVar)
      )
      self.m = ModuleList(
          StateVar(jn.zeros_like(x.value)) for x in self.train_vars
      )
  
file_path: objax/objax/optimizer/lars.py
imports: from typing import List
  import jax.numpy
  from objax.module import Module, ModuleList
  from objax.typing import JaxArray
  from objax.util import class_name
  from objax.variable import TrainRef, StateVar, TrainVar, VarCollection
label_desc: Use image node_id 1 to create a new LARS object from inherited base classes: Module with example: obj = LARS(vc, momentum, weight_decay, tc, eps)