tf.compat.v1.distributions.ReparameterizationType
Stay organized with collections
Save and categorize content based on your preferences.
Instances of this class represent how sampling is reparameterized.
tf.compat.v1.distributions.ReparameterizationType(
rep_type
)
Two static instances exist in the distributions library, signifying
one of two possible properties for samples from a distribution:
FULLY_REPARAMETERIZED
: Samples from the distribution are fully
reparameterized, and straight-through gradients are supported.
NOT_REPARAMETERIZED
: Samples from the distribution are not fully
reparameterized, and straight-through gradients are either partially
unsupported or are not supported at all. In this case, for purposes of
e.g. RL or variational inference, it is generally safest to wrap the
sample results in a stop_gradients
call and use policy
gradients / surrogate loss instead.
Methods
__eq__
View source
__eq__(
other
)
Determine if this ReparameterizationType
is equal to another.
Since RepaparameterizationType instances are constant static global
instances, equality checks if two instances' id() values are equal.
Args |
other
|
Object to compare against.
|
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 2020-10-01 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 2020-10-01 UTC."],[],[],null,["# tf.compat.v1.distributions.ReparameterizationType\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/ops/distributions/distribution.py#L216-L259) |\n\nInstances of this class represent how sampling is reparameterized. \n\n tf.compat.v1.distributions.ReparameterizationType(\n rep_type\n )\n\nTwo static instances exist in the distributions library, signifying\none of two possible properties for samples from a distribution:\n\n`FULLY_REPARAMETERIZED`: Samples from the distribution are fully\nreparameterized, and straight-through gradients are supported.\n\n`NOT_REPARAMETERIZED`: Samples from the distribution are not fully\nreparameterized, and straight-through gradients are either partially\nunsupported or are not supported at all. In this case, for purposes of\ne.g. RL or variational inference, it is generally safest to wrap the\nsample results in a `stop_gradients` call and use policy\ngradients / surrogate loss instead.\n\nMethods\n-------\n\n### `__eq__`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/ops/distributions/distribution.py#L247-L259) \n\n __eq__(\n other\n )\n\nDetermine if this `ReparameterizationType` is equal to another.\n\nSince RepaparameterizationType instances are constant static global\ninstances, equality checks if two instances' id() values are equal.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|---------|----------------------------|\n| `other` | Object to compare against. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| `self is other`. ||\n\n\u003cbr /\u003e"]]