Missed TensorFlow World? Check out the recap. Learn more

tfp.edward2.Distribution

View source on GitHub

Create a random variable for Distribution.

Aliases:

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

See Distribution for more details.

Returns:

RandomVariable.

Original Docstring for Distribution

Constructs the Distribution.

This is a private method for subclass use.

Args:

  • dtype: The type of the event samples. None implies no type-enforcement.
  • reparameterization_type: Instance of ReparameterizationType. If tfd.FULLY_REPARAMETERIZED, then samples from the distribution are fully reparameterized, and straight-through gradients are supported. If tfd.NOT_REPARAMETERIZED, then samples from the distribution are not fully reparameterized, and straight-through gradients are either partially unsupported or are not supported at all.
  • 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.
  • 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.
  • parameters: Python dict of parameters used to instantiate this Distribution.
  • graph_parents: Python list of graph prerequisites of this Distribution.
  • name: Python str name prefixed to Ops created by this class. Default: subclass name.

Raises:

  • ValueError: if any member of graph_parents is None or not a Tensor.