tfp.math.MinimizeTraceableQuantities

View source on GitHub

Namedtuple of quantities that may be traced from tfp.math.minimize.

These are (in order):

  • step: int Tensor index (starting from zero) of the current optimization step.
  • loss: float Tensor value returned from the user-provided loss_fn.
  • gradients: list of Tensor gradients of loss with respect to the parameters.
  • parameters: list of Tensor values of parameters being optimized. This corresponds to the trainable_variables passed in to minimize.
  • has_converged: boolean Tensor of the same shape as loss_fn, with True values corresponding to loss entries that have converged according to the user-provided convergence criterion. If no convergence criterion was specified, this is None.
  • convergence_criterion_state: structure of Tensors containing any auxiliary state (e.g., moving averages of loss or other quantities) maintained by the user-provided convergence criterion.

step

loss

gradients

parameters

has_converged

convergence_criterion_state