Implement TFP's base measure interface for distrax dists and bijectors. #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement TFP's base measure interface for distrax dists and bijectors.
The interface needs two new methods: an
experimental_local_measure
onDistribution
s,and an
experimental_density_correction
onBijector
s. We implement these methodsusing the default assumptions already made by TFP: that the tangent space to a manifold
has the standard basis on R^n, and that the transformations on this manifold are
dimension-preserving. In the future, TFP will define more appropriate bases and
density corrections for subclasses of
Distribution
andBijector
; distrax is not expectedto follow this protocol.
See:
tfp.python.experimental.tangent_spaces
tfp.distributions.experimental_local_measure
tfp.bijectors.experimental_compute_density_correction