tfp.edward2.Independent

Create a random variable for Independent.

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

Defined in python/edward2/interceptor.py.

See Independent for more details.

Returns:

RandomVariable.

Original Docstring for Distribution

Construct a Independent distribution.

Args:

  • distribution: The base distribution instance to transform. Typically an instance of Distribution.
  • reinterpreted_batch_ndims: Scalar, integer number of rightmost batch dims which will be regarded as event dims. When None all but the first batch axis (batch axis 0) will be transferred to event dimensions (analogous to tf.layers.flatten).
  • validate_args: Python bool. Whether to validate input with asserts. If validate_args is False, and the inputs are invalid, correct behavior is not guaranteed.
  • name: The name for ops managed by the distribution. Default value: Independent + distribution.name.

Raises:

  • ValueError: if reinterpreted_batch_ndims exceeds distribution.batch_ndims