LostTech.TensorFlow : API Documentation

Type tf.distributions

Namespace tensorflow

Public static methods

Tensor kl_divergence(object distribution_a, object distribution_b, bool allow_nan_stats, string name)

Get the KL-divergence KL(distribution_a || distribution_b). (deprecated)

Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2019-01-01. Instructions for updating: The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use `tfp.distributions` instead of tf.distributions.

If there is no KL method registered specifically for `type(distribution_a)` and `type(distribution_b)`, then the class hierarchies of these types are searched.

If one KL method is registered between any pairs of classes in these two parent hierarchies, it is used.

If more than one such registered method exists, the method whose registered classes have the shortest sum MRO paths to the input types is used.

If more than one such shortest path exists, the first method identified in the search is used (favoring a shorter MRO distance to `type(distribution_a)`).
Parameters
object distribution_a
The first distribution.
object distribution_b
The second distribution.
bool allow_nan_stats
Python `bool`, default `True`. When `True`, statistics (e.g., mean, mode, variance) use the value "`NaN`" to indicate the result is undefined. When `False`, an exception is raised if one or more of the statistic's batch members are undefined.
string name
Python `str` name prefixed to Ops created by this class.
Returns
Tensor
A Tensor with the batchwise KL-divergence between `distribution_a` and `distribution_b`.

object kl_divergence_dyn(object distribution_a, object distribution_b, ImplicitContainer<T> allow_nan_stats, object name)

Get the KL-divergence KL(distribution_a || distribution_b). (deprecated)

Warning: THIS FUNCTION IS DEPRECATED. It will be removed after 2019-01-01. Instructions for updating: The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use `tfp.distributions` instead of tf.distributions.

If there is no KL method registered specifically for `type(distribution_a)` and `type(distribution_b)`, then the class hierarchies of these types are searched.

If one KL method is registered between any pairs of classes in these two parent hierarchies, it is used.

If more than one such registered method exists, the method whose registered classes have the shortest sum MRO paths to the input types is used.

If more than one such shortest path exists, the first method identified in the search is used (favoring a shorter MRO distance to `type(distribution_a)`).
Parameters
object distribution_a
The first distribution.
object distribution_b
The second distribution.
ImplicitContainer<T> allow_nan_stats
Python `bool`, default `True`. When `True`, statistics (e.g., mean, mode, variance) use the value "`NaN`" to indicate the result is undefined. When `False`, an exception is raised if one or more of the statistic's batch members are undefined.
object name
Python `str` name prefixed to Ops created by this class.
Returns
object
A Tensor with the batchwise KL-divergence between `distribution_a` and `distribution_b`.

Public properties

ReparameterizationType FULLY_REPARAMETERIZED get; set;

PythonFunctionContainer kl_divergence_fn get;

ReparameterizationType NOT_REPARAMETERIZED get; set;