class_docstr: Implements a natural gradient descent optimizer for variational models
  that are based on a distribution q(u) = N(q_mu, q_sqrt q_sqrtᵀ) that is
  parameterized by mean q_mu and lower-triangular Cholesky factor q_sqrt
  of the covariance.
  
  Note that this optimizer does not implement the standard API of
  tf.optimizers.Optimizer. Its only public method is minimize(), which has
  a custom signature (var_list needs to be a list of (q_mu, q_sqrt) tuples,
  where q_mu and q_sqrt are gpflow.Parameter instances, not tf.Variable).
  
  Note furthermore that the natural gradients are implemented only for the
  full covariance case (i.e., q_diag=True is NOT supported).
  
  When using in your work, please cite :cite:t:`salimbeni18`.
class_docstr_tok: ["Implements","a","natural","gradient","descent","optimizer","for","variational","models","that","are","based","on","a","distribution","q","(","u",")","=","N","(","q_mu",",","q_sqrt","q_sqrt\u1d40",")","that","is","parameterized","by","mean","q_mu","and","lower-triangular","Cholesky","factor","q_sqrt","of","the","covariance",".","Note","that","this","optimizer","does","not","implement","the","standard","API","of","tf.optimizers.Optimizer",".","Its","only","public","method","is","minimize","(",")",",","which","has","a","custom","signature","(","var_list","needs","to","be","a","list","of","(","q_mu",",","q_sqrt",")","tuples",",","where","q_mu","and","q_sqrt","are","gpflow.Parameter","instances",",","not","tf.Variable",")",".","Note","furthermore","that","the","natural","gradients","are","implemented","only","for","the","full","covariance","case","(","i.e.",",","q_diag=True","is","NOT","supported",")",".","When","using","in","your","work",",","please","cite",":","cite",":","t",":","`","salimbeni18","`","."]
docstr: :param gamma: natgrad step length
  :param xi_transform: default ξ transform (can be overridden in the call to minimize())
      The XiNat default choice works well in general.
docstr_tok: [":","param","gamma",":","natgrad","step","length",":","param","xi_transform",":","default","\u03be","transform","(","can","be","overridden","in","the","call","to","minimize","(",")",")","The","XiNat","default","choice","works","well","in","general","."]
code: def __init__(
      self,
      gamma: Scalar,
      xi_transform: XiTransform = XiNat(),
      name: Optional[str] = None,
  ) -> None:
      """
      :param gamma: natgrad step length
      :param xi_transform: default ξ transform (can be overridden in the call to minimize())
          The XiNat default choice works well in general.
      """
      name = self.__class__.__name__ if name is None else name
      super().__init__(name)
      # explicitly store name (as TF <2.12 stores it differently from TF 2.12+)
      self.natgrad_name = name
      self.gamma = gamma
      self.xi_transform = xi_transform
  
imports: import abc
  import functools
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Union
  import tensorflow
  from check_shapes import check_shapes
  from ..base import AnyNDArray, Parameter, _to_constrained
label_desc: Use image node_id 1 to create a new NaturalGradient object from inherited base classes: tf.optimizers with example: obj = NaturalGradient(gamma, xi_transform, name)