class_docstr: the LARS optimizer from 'Large Batch Training of Convolution Networks'     (https://arxiv.org/abs/1708.03888)
  
  Behave mostly like SGD with momentum and weight decay but is scaling     adaptively the learning for each layer:
  
  .. code-block::
  
     w_norm = L2norm(weights)
     g_norm = L2norm(gradients)
     if w_norm > 0 and g_norm > 0:
         lr_layer = lr * w_norm / (g_norm + weight_decay * w_norm + epsilon)
     else:
         lr_layer = lr
  
  
  Parameters
  ----------
  learning_rate : float, default 0.1
      The initial learning rate. If None, the optimization will use the
      learning rate from ``lr_scheduler``. If not None, it will overwrite
      the learning rate in ``lr_scheduler``. If None and ``lr_scheduler``
      is also None, then it will be set to 0.01 by default.
  momentum : float, default 0.
      The momentum value.
  eta : float, default 0.001
      LARS coefficient used to scale the learning rate.
  epsilon : float, default 1e-8
      Small value to avoid division by 0.
  lazy_update : bool, default False
      Default is False. If True, lazy updates are applied         if the storage types of weight and grad are both ``row_sparse``.
  aggregate_num : int, default 1
      Number of weights to be aggregated in a list.
      They are passed to the optimizer for a single optimization step.
  use_fused_step : bool, default True
      Whether or not to use fused kernels for optimizer.
      When use_fused_step=False, step is called,
      otherwise, fused_step is called.
class_docstr_tok: ["the","LARS","optimizer","from","'Large","Batch","Training","of","Convolution","Networks","'","(","https",":","\/\/arxiv.org\/abs\/1708.03888",")","Behave","mostly","like","SGD","with","momentum","and","weight","decay","but","is","scaling","adaptively","the","learning","for","each","layer",":","..","code-block",":",":","w_norm","=","L2norm","(","weights",")","g_norm","=","L2norm","(","gradients",")","if","w_norm",">","0","and","g_norm",">","0",":","lr_layer","=","lr","*","w_norm","\/","(","g_norm","+","weight_decay","*","w_norm","+","epsilon",")","else",":","lr_layer","=","lr","Parameters","--","--","--","--","--","learning_rate",":","float",",","default","0.1","The","initial","learning","rate",".","If","None",",","the","optimization","will","use","the","learning","rate","from","``","lr_scheduler","``",".","If","not","None",",","it","will","overwrite","the","learning","rate","in","``","lr_scheduler","``",".","If","None","and","``","lr_scheduler","``","is","also","None",",","then","it","will","be","set","to","0.01","by","default",".","momentum",":","float",",","default","0",".","The","momentum","value",".","eta",":","float",",","default","0.001","LARS","coefficient","used","to","scale","the","learning","rate",".","epsilon",":","float",",","default","1e-8","Small","value","to","avoid","division","by","0.","lazy_update",":","bool",",","default","False","Default","is","False",".","If","True",",","lazy","updates","are","applied","if","the","storage","types","of","weight","and","grad","are","both","``","row_sparse","``",".","aggregate_num",":","int",",","default","1","Number","of","weights","to","be","aggregated","in","a","list",".","They","are","passed","to","the","optimizer","for","a","single","optimization","step",".","use_fused_step",":","bool",",","default","True","Whether","or","not","to","use","fused","kernels","for","optimizer",".","When","use_fused_step=False",",","step","is","called",",","otherwise",",","fused_step","is","called","."]
docstr: L2 Norm implementation
docstr_tok: ["L2","Norm","implementation"]
code: def _l2norm(self, v, rescale=False):
      """L2 Norm implementation"""
      v = v.astype("float32")
      if rescale:
          v *= self.rescale_grad
      norm = NDnorm(v)
      return norm
  
file_path: mxnet/python/mxnet/optimizer/lars.py
imports: from __future__ import absolute_import
  import numpy
  from ..ndarray import zeros, clip, array, multi_sum_sq, multi_lars, norm, where, ones_like
  from ..ndarray import sgd_update, sgd_mom_update, mp_sgd_update, mp_sgd_mom_update, preloaded_multi_sgd_update, preloaded_multi_sgd_mom_update, preloaded_multi_mp_sgd_update, preloaded_multi_mp_sgd_mom_update
  from .optimizer import Optimizer, register
  from .utils import _flatten_list
label_desc: Use image node_id 3 for calling the LARS obj's underlying member method code with example usage: obj._l2norm(v, rescale) and returns: norm