class_docstr: Adafactor.
docstr: Construct a new Adafactor optimizer.
  
  See class comment.
  
  Args:
    multiply_by_parameter_scale: a boolean
    learning_rate: an optional Scalar.
    decay_rate: an optional Scalar.
    beta1: a float value between 0 and 1
    clipping_threshold: an optional float >= 1
    factored: a boolean - whether to use factored second-moment estimator
      for 2d variables
    epsilon1: Regularization constant for squared gradient.
    epsilon2: Regularization constant for parameter scale.
    min_dim_size_to_factor: only factor accumulator if two tensor dimensions
      are at least this size.
    stacked_dim_names: an optional list of dimension names never to be
      factored or reduced over.
    exclude_from_parameter_scale: an optional list of strings of parameter
      names to exclude from updating proportion to its parameter scale.
  
  Raises:
    ValueError: if absolute_update_scale and relative_update_scale_fn are both
      present or both absent.
docstr_tok: ["Construct","a","new","Adafactor","optimizer",".","See","class","comment",".","Args",":","multiply_by_parameter_scale",":","a","boolean","learning_rate",":","an","optional","Scalar",".","decay_rate",":","an","optional","Scalar",".","beta1",":","a","float","value","between","0","and","1","clipping_threshold",":","an","optional","float",">","=","1","factored",":","a","boolean","-","whether","to","use","factored","second-moment","estimator","for","2d","variables","epsilon1",":","Regularization","constant","for","squared","gradient",".","epsilon2",":","Regularization","constant","for","parameter","scale",".","min_dim_size_to_factor",":","only","factor","accumulator","if","two","tensor","dimensions","are","at","least","this","size",".","stacked_dim_names",":","an","optional","list","of","dimension","names","never","to","be","factored","or","reduced","over",".","exclude_from_parameter_scale",":","an","optional","list","of","strings","of","parameter","names","to","exclude","from","updating","proportion","to","its","parameter","scale",".","Raises",":","ValueError",":","if","absolute_update_scale","and","relative_update_scale_fn","are","both","present","or","both","absent","."]
code: def __init__(
      self,
      multiply_by_parameter_scale=True,
      learning_rate=None,
      decay_rate=None,
      beta1=0.0,
      clipping_threshold=1.0,
      factored=True,
      epsilon1=1e-30,
      epsilon2=1e-3,
      min_dim_size_to_factor=128,
      stacked_dim_names=None,
      exclude_from_parameter_scale=None,
  ):
      """Construct a new Adafactor optimizer.
  
      See class comment.
  
      Args:
        multiply_by_parameter_scale: a boolean
        learning_rate: an optional Scalar.
        decay_rate: an optional Scalar.
        beta1: a float value between 0 and 1
        clipping_threshold: an optional float >= 1
        factored: a boolean - whether to use factored second-moment estimator
          for 2d variables
        epsilon1: Regularization constant for squared gradient.
        epsilon2: Regularization constant for parameter scale.
        min_dim_size_to_factor: only factor accumulator if two tensor dimensions
          are at least this size.
        stacked_dim_names: an optional list of dimension names never to be
          factored or reduced over.
        exclude_from_parameter_scale: an optional list of strings of parameter
          names to exclude from updating proportion to its parameter scale.
  
      Raises:
        ValueError: if absolute_update_scale and relative_update_scale_fn are both
          present or both absent.
      """
      self._multiply_by_parameter_scale = multiply_by_parameter_scale
      if learning_rate is None:
          learning_rate = self._learning_rate_default(
              multiply_by_parameter_scale
          )
      self._learning_rate = learning_rate
      if decay_rate is None:
          decay_rate = self._decay_rate_default()
      self._decay_rate = decay_rate
      self._beta1 = beta1
      self._clipping_threshold = clipping_threshold
      self._factored = factored
      self._epsilon1 = epsilon1
      self._epsilon2 = epsilon2
      self._min_dim_size_to_factor = min_dim_size_to_factor
      self._stacked_dim_names = stacked_dim_names or []
      self._exclude_from_parameter_scale = (
          exclude_from_parameter_scale or []
      )
  
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 1 to create a new AdafactorOptimizer object from inherited base classes: Optimizer with example: obj = AdafactorOptimizer(multiply_by_parameter_scale, learning_rate, decay_rate, beta1, clipping_threshold, factored, epsilon1, epsilon2, min_dim_size_to_factor, stacked_dim_names, exclude_from_parameter_scale)