tf.contrib.distributions.Uniform.__init__()

tf.contrib.distributions.Uniform.__init__(a=0.0, b=1.0, validate_args=False, allow_nan_stats=True, name='Uniform')

Construct Uniform distributions with a and b.

The parameters a and b must be shaped in a way that supports broadcasting (e.g. b - a is a valid operation).

Here are examples without broadcasting:

# Without broadcasting
u1 = Uniform(3.0, 4.0)  # a single uniform distribution [3, 4]
u2 = Uniform([1.0, 2.0], [3.0, 4.0])  # 2 distributions [1, 3], [2, 4]
u3 = Uniform([[1.0, 2.0],
              [3.0, 4.0]],
             [[1.5, 2.5],
              [3.5, 4.5]])  # 4 distributions

And with broadcasting:

u1 = Uniform(3.0, [5.0, 6.0, 7.0])  # 3 distributions
Args:
  • a: Floating point tensor, the minimum endpoint.
  • b: Floating point tensor, the maximum endpoint. Must be > a.
  • validate_args: Boolean, default False. Whether to validate input with asserts. If validate_args is False, and the inputs are invalid, correct behavior is not guaranteed.
  • allow_nan_stats: Boolean, default True. If False, raise an exception if a statistic (e.g. mean/mode/etc...) is undefined for any batch member. If True, batch members with valid parameters leading to undefined statistics will return NaN for this statistic.
  • name: The name to prefix Ops created by this distribution class.
Raises:
  • InvalidArgumentError: if a >= b and validate_args=False.
doc_TensorFlow
2016-10-14 13:03:47
Comments
Leave a Comment

Please login to continue.