tfp.substrates.numpy.math.MinimizeTraceableQuantities
Stay organized with collections
Save and categorize content based on your preferences.
Namedtuple of quantities that may be traced from tfp.math.minimize
.
tfp.substrates.numpy.math.MinimizeTraceableQuantities(
step,
loss,
gradients,
parameters,
has_converged,
convergence_criterion_state,
optimizer_state,
seed
)
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 trainable_variables
passed to minimize
, or
init
passed to minimize_stateless
.
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 Tensor
s containing any
auxiliary state (e.g., moving averages of loss or other quantities)
maintained by the user-provided convergence criterion.
optimizer_state
: structure of Tensor
s containing optional state from
a user-provided pure optimizer.
Attributes |
step
|
A namedtuple alias for field number 0
|
loss
|
A namedtuple alias for field number 1
|
gradients
|
A namedtuple alias for field number 2
|
parameters
|
A namedtuple alias for field number 3
|
has_converged
|
A namedtuple alias for field number 4
|
convergence_criterion_state
|
A namedtuple alias for field number 5
|
optimizer_state
|
A namedtuple alias for field number 6
|
seed
|
A namedtuple alias for field number 7
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-21 UTC."],[],[],null,["# tfp.substrates.numpy.math.MinimizeTraceableQuantities\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/probability/blob/v0.23.0/tensorflow_probability/substrates/numpy/math/minimize.py#L30-L56) |\n\nNamedtuple of quantities that may be traced from [`tfp.math.minimize`](../../../../tfp/math/minimize).\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tfp.experimental.substrates.numpy.math.MinimizeTraceableQuantities`](https://www.tensorflow.org/probability/api_docs/python/tfp/substrates/numpy/math/MinimizeTraceableQuantities)\n\n\u003cbr /\u003e\n\n tfp.substrates.numpy.math.MinimizeTraceableQuantities(\n step,\n loss,\n gradients,\n parameters,\n has_converged,\n convergence_criterion_state,\n optimizer_state,\n seed\n )\n\nThese are (in order):\n\n- `step`: int `Tensor` index (starting from zero) of the current optimization step.\n- `loss`: float `Tensor` value returned from the user-provided `loss_fn`.\n- `gradients`: list of `Tensor` gradients of `loss` with respect to the parameters.\n- `parameters`: list of `Tensor` values of parameters being optimized. This corresponds to `trainable_variables` passed to `minimize`, or `init` passed to `minimize_stateless`.\n- `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`.\n- `convergence_criterion_state`: structure of `Tensor`s containing any auxiliary state (e.g., moving averages of loss or other quantities) maintained by the user-provided convergence criterion.\n- `optimizer_state`: structure of `Tensor`s containing optional state from a user-provided pure optimizer.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-------------------------------|-----------------------------------------|\n| `step` | A `namedtuple` alias for field number 0 |\n| `loss` | A `namedtuple` alias for field number 1 |\n| `gradients` | A `namedtuple` alias for field number 2 |\n| `parameters` | A `namedtuple` alias for field number 3 |\n| `has_converged` | A `namedtuple` alias for field number 4 |\n| `convergence_criterion_state` | A `namedtuple` alias for field number 5 |\n| `optimizer_state` | A `namedtuple` alias for field number 6 |\n| `seed` | A `namedtuple` alias for field number 7 |\n\n\u003cbr /\u003e"]]