class_docstr: Natural gradient optimizer (specification key: `natural_gradient`).
  
  Args:
      learning_rate (parameter, float > 0.0): Learning rate as KL-divergence of distributions
          between optimization steps
          (<span style="color:#C00000"><b>required</b></span>).
      cg_max_iterations (int >= 1): Maximum number of conjugate gradient iterations.
          (<span style="color:#00C000"><b>default</b></span>: 10).
      cg_damping (0.0 <= float <= 1.0): Conjugate gradient damping factor.
          (<span style="color:#00C000"><b>default</b></span>: 0.1).
      only_positive_updates (bool): Whether to only perform updates with positive improvement
          estimate
          (<span style="color:#00C000"><b>default</b></span>: true).
      name (string): (<span style="color:#0000C0"><b>internal use</b></span>).
      arguments_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
class_docstr_tok: ["Natural","gradient","optimizer","(","specification","key",":","`","natural_gradient","`",")",".","Args",":","learning_rate","(","parameter",",","float",">","0.0",")",":","Learning","rate","as","KL-divergence","of","distributions","between","optimization","steps","(","<","span","style=","''","color",":","#","C00000","''",">","<","b",">","required","<","\/b",">","<","\/span",">",")",".","cg_max_iterations","(","int",">","=","1",")",":","Maximum","number","of","conjugate","gradient","iterations",".","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","10",")",".","cg_damping","(","0.0","<","=","float","<","=","1.0",")",":","Conjugate","gradient","damping","factor",".","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","0.1",")",".","only_positive_updates","(","bool",")",":","Whether","to","only","perform","updates","with","positive","improvement","estimate","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","true",")",".","name","(","string",")",":","(","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",")",".","arguments_spec","(","specification",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">","."]
code: def __init__(
      self,
      *,
      learning_rate,
      cg_max_iterations=10,
      cg_damping=0.1,
      only_positive_updates=True,
      name=None,
      arguments_spec=None,
  ):
      super().__init__(name=name, arguments_spec=arguments_spec)
  
      self.learning_rate = self.submodule(
          name="learning_rate",
          module=learning_rate,
          modules=parameter_modules,
          dtype="float",
          min_value=0.0,
      )
  
      self.conjugate_gradient = self.submodule(
          name="conjugate_gradient",
          module="conjugate_gradient",
          modules=solver_modules,
          max_iterations=cg_max_iterations,
          damping=cg_damping,
      )
  
      self.only_positive_updates = only_positive_updates
  
file_path: tensorforce/tensorforce/core/optimizers/natural_gradient.py
imports: import functools
  import tensorflow
  from tensorforce import util
  from tensorforce.core import parameter_modules, TensorDict, tf_function, tf_util
  from tensorforce.core.optimizers import Optimizer
  from tensorforce.core.optimizers.solvers import solver_modules
label_desc: Use image node_id 1 to create a new NaturalGradient object from inherited base classes: Optimizer with example: obj = NaturalGradient()