Type Uniform
Namespace tensorflow.distributions
Parent Distribution
Interfaces IUniform
Uniform distribution with `low` and `high` parameters. #### Mathematical Details The probability density function (pdf) is, ```none
pdf(x; a, b) = I[a <= x < b] / Z
Z = b - a
``` where - `low = a`,
- `high = b`,
- `Z` is the normalizing constant, and
- `I[predicate]` is the [indicator function](
https://en.wikipedia.org/wiki/Indicator_function) for `predicate`. The parameters `low` and `high` must be shaped in a way that supports
broadcasting (e.g., `high - low` is a valid operation). #### Examples
Show Example
# Without broadcasting: u1 = Uniform(low=3.0, high=4.0) # a single uniform distribution [3, 4] u2 = Uniform(low=[1.0, 2.0], high=[3.0, 4.0]) # 2 distributions [1, 3], [2, 4] u3 = Uniform(low=[[1.0, 2.0], [3.0, 4.0]], high=[[1.5, 2.5], [3.5, 4.5]]) # 4 distributions
Methods
Properties
Public instance methods
double range(string name)
`high - low`.
object range_dyn(ImplicitContainer<T> name)
`high - low`.
Public properties
object allow_nan_stats get;
object allow_nan_stats_dyn get;
TensorShape batch_shape get;
object batch_shape_dyn get;
object dtype get;
object dtype_dyn get;
TensorShape event_shape get;
object event_shape_dyn get;
object high get;
Upper boundary of the output interval.
object high_dyn get;
Upper boundary of the output interval.
object low get;
Lower boundary of the output interval.
object low_dyn get;
Lower boundary of the output interval.