def __init__(
        self,
        learning_rate,
        cg_max_iterations=20,
        cg_damping=1e-3,
        cg_unroll_loop=False,
        scope='natural-gradient',
        summary_labels=()
    ):
        """
        Creates a new natural gradient optimizer instance.

        Args:
            learning_rate: Learning rate, i.e. KL-divergence of distributions between optimization steps.
            cg_max_iterations: Conjugate gradient solver max iterations.
            cg_damping: Conjugate gradient solver damping factor.
            cg_unroll_loop: Unroll conjugate gradient loop if true.
        """
        assert learning_rate > 0.0
        self.learning_rate = learning_rate

        self.solver = ConjugateGradient(
            max_iterations=cg_max_iterations,
            damping=cg_damping,
            unroll_loop=cg_unroll_loop
        )

        super(NaturalGradient, self).__init__(scope=scope, summary_labels=summary_labels)
def __init__ ( self , learning_rate , cg_max_iterations = 20 , cg_damping = 1e-3 , cg_unroll_loop = False , scope = 'natural-gradient' , summary_labels = ( ) ) : assert learning_rate > 0.0 self . learning_rate = learning_rate self . solver = ConjugateGradient ( max_iterations = cg_max_iterations , damping = cg_damping , unroll_loop = cg_unroll_loop ) super ( NaturalGradient , self ) . __init__ ( scope = scope , summary_labels = summary_labels )
Creates a new natural gradient optimizer instance.

        Args:
            learning_rate: Learning rate, i.e. KL-divergence of distributions between optimization steps.
            cg_max_iterations: Conjugate gradient solver max iterations.
            cg_damping: Conjugate gradient solver damping factor.
            cg_unroll_loop: Unroll conjugate gradient loop if true.