class_docstr: Adafactor.
docstr: Estimate the scale of the parameters from the current values.
  
  We include a minimum value of 0.001 to give it a chance to escape 0
  if it was zero-initialized.
  
  Instead of using the value, we could impute the scale from the shape,
  as initializers do.
  
  Args:
    var: a variable or Tensor.
  Returns:
    a Scalar
docstr_tok: ["Estimate","the","scale","of","the","parameters","from","the","current","values",".","We","include","a","minimum","value","of","0.001","to","give","it","a","chance","to","escape","0","if","it","was","zero-initialized",".","Instead","of","using","the","value",",","we","could","impute","the","scale","from","the","shape",",","as","initializers","do",".","Args",":","var",":","a","variable","or","Tensor",".","Returns",":","a","Scalar"]
code: def _parameter_scale(self, var):
      """Estimate the scale of the parameters from the current values.
  
      We include a minimum value of 0.001 to give it a chance to escape 0
      if it was zero-initialized.
  
      Instead of using the value, we could impute the scale from the shape,
      as initializers do.
  
      Args:
        var: a variable or Tensor.
      Returns:
        a Scalar
      """
      output_shape = [
          d for d in var.shape.dims if d.name in self._stacked_dim_names
      ]
      return mtf.maximum(
          reduce_rms(var, output_shape=output_shape), self._epsilon2
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import re
  import gin
  from mesh_tensorflow import layers
  from mesh_tensorflow import ops_with_redefined_builtins
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the AdafactorOptimizer obj's underlying member method code with example usage: obj._parameter_scale(var) and returns: mtf