tf.contrib.distributions.RegisterKL.__init__()

tf.contrib.distributions.RegisterKL.__init__(dist_cls_a, dist_cls_b) Initialize the KL registrar. Args: dist_cls_a: the class of the first argument of the KL divergence. dist_cls_b: the class of the second argument of the KL divergence.

tf.contrib.distributions.RegisterKL.__call__()

tf.contrib.distributions.RegisterKL.__call__(kl_fn) Perform the KL registration. Args: kl_fn: The function to use for the KL divergence. Returns: kl_fn Raises: TypeError: if kl_fn is not a callable. ValueError: if a KL divergence function has already been registered for the given argument classes.

tf.contrib.distributions.RegisterKL

class tf.contrib.distributions.RegisterKL Decorator to register a KL divergence implementation function. Usage: @distributions.RegisterKL(distributions.Normal, distributions.Normal) def _kl_normal_mvn(norm_a, norm_b): # Return KL(norm_a || norm_b)

tf.contrib.distributions.QuantizedDistribution.__init__()

tf.contrib.distributions.QuantizedDistribution.__init__(base_dist_cls, lower_cutoff=None, upper_cutoff=None, name='QuantizedDistribution', **base_dist_args) Construct a Quantized Distribution. Some properties are inherited from the distribution defining X. In particular, validate_args and allow_nan_stats are determined for this QuantizedDistribution by reading the additional kwargs passed as base_dist_args. Args: base_dist_cls: the base distribution class to transform. Must be a subclass of D

tf.contrib.distributions.QuantizedDistribution.variance()

tf.contrib.distributions.QuantizedDistribution.variance(name='variance') Variance.

tf.contrib.distributions.QuantizedDistribution.validate_args

tf.contrib.distributions.QuantizedDistribution.validate_args Python boolean indicated possibly expensive checks are enabled.

tf.contrib.distributions.QuantizedDistribution.survival_function()

tf.contrib.distributions.QuantizedDistribution.survival_function(value, name='survival_function') Survival function. Given random variable X, the survival function is defined: survival_function(x) = P[X > x] = 1 - P[X <= x] = 1 - cdf(x). Additional documentation from QuantizedDistribution: For whole numbers y, survival_function(y) := P[Y > y] = 0, if y >= upper_cutoff, = 1, if y < lower_cutoff

tf.contrib.distributions.QuantizedDistribution.std()

tf.contrib.distributions.QuantizedDistribution.std(name='std') Standard deviation.

tf.contrib.distributions.QuantizedDistribution.sample_n()

tf.contrib.distributions.QuantizedDistribution.sample_n(n, seed=None, name='sample_n') Generate n samples. Args: n: Scalar Tensor of type int32 or int64, the number of observations to sample. seed: Python integer seed for RNG name: name to give to the op. Returns: samples: a Tensor with a prepended dimension (n,). Raises: TypeError: if n is not an integer type.

tf.contrib.distributions.QuantizedDistribution.sample()

tf.contrib.distributions.QuantizedDistribution.sample(sample_shape=(), seed=None, name='sample') Generate samples of the specified shape. Note that a call to sample() without arguments will generate a single sample. Args: sample_shape: 0D or 1D int32 Tensor. Shape of the generated samples. seed: Python integer seed for RNG name: name to give to the op. Returns: samples: a Tensor with prepended dimensions sample_shape.