TensorFlow 2.0 Beta is available Learn more

tfp.edward2.QuantizedDistribution

Create a random variable for QuantizedDistribution.

tfp.edward2.QuantizedDistribution(
    *args,
    **kwargs
)

Defined in python/edward2/interceptor.py.

See QuantizedDistribution for more details.

Returns:

RandomVariable.

Original Docstring for Distribution

Construct a Quantized Distribution representing Y = ceiling(X).

Some properties are inherited from the distribution defining X. Example: allow_nan_stats is determined for this QuantizedDistribution by reading the distribution.

Args:

  • distribution: The base distribution class to transform. Typically an instance of Distribution.
  • low: Tensor with same dtype as this distribution and shape able to be added to samples. Should be a whole number. Default None. If provided, base distribution's prob should be defined at low.
  • high: Tensor with same dtype as this distribution and shape able to be added to samples. Should be a whole number. Default None. If provided, base distribution's prob should be defined at high - 1. high must be strictly greater than low.
  • validate_args: Python bool, default False. When True distribution parameters are checked for validity despite possibly degrading runtime performance. When False invalid inputs may silently render incorrect outputs.
  • name: Python str name prefixed to Ops created by this class.

Raises:

  • TypeError: If dist_cls is not a subclass of Distribution or continuous.
  • NotImplementedError: If the base distribution does not implement cdf.