class_docstr: 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
  
  ```python
  # 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
  ```
  
  ```python
  # With broadcasting:
  u1 = Uniform(low=3.0, high=[5.0, 6.0, 7.0])  # 3 distributions
  ```
class_docstr_tok: ["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","``","`","python","#","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","``","`","``","`","python","#","With","broadcasting",":","u1","=","Uniform","(","low=3.0",",","high=","[","5.0",",","6.0",",","7.0","]",")","#","3","distributions","``","`"]
docstr: Initialize a batch of Uniform distributions.
  
  Args:
    low: Floating point tensor, lower boundary of the output interval. Must
      have `low < high`.
    high: Floating point tensor, upper boundary of the output interval. Must
      have `low < high`.
    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.
    name: Python `str` name prefixed to Ops created by this class.
  
  Raises:
    InvalidArgumentError: if `low >= high` and `validate_args=False`.
docstr_tok: ["Initialize","a","batch","of","Uniform","distributions",".","Args",":","low",":","Floating","point","tensor",",","lower","boundary","of","the","output","interval",".","Must","have","`","low","<","high","`",".","high",":","Floating","point","tensor",",","upper","boundary","of","the","output","interval",".","Must","have","`","low","<","high","`",".","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",".","name",":","Python","`","str","`","name","prefixed","to","Ops","created","by","this","class",".","Raises",":","InvalidArgumentError",":","if","`","low",">","=","high","`","and","`","validate_args=False","`","."]
code: def __init__(
      self,
      low=0.0,
      high=1.0,
      validate_args=False,
      allow_nan_stats=True,
      name="Uniform",
  ):
      """Initialize a batch of Uniform distributions.
  
      Args:
        low: Floating point tensor, lower boundary of the output interval. Must
          have `low < high`.
        high: Floating point tensor, upper boundary of the output interval. Must
          have `low < high`.
        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.
        name: Python `str` name prefixed to Ops created by this class.
  
      Raises:
        InvalidArgumentError: if `low >= high` and `validate_args=False`.
      """
      parameters = dict(locals())
      with ops.name_scope(name, values=[low, high]) as name:
          with ops.control_dependencies(
              [
                  check_ops.assert_less(
                      low,
                      high,
                      message="uniform not defined when low >= high.",
                  )
              ]
              if validate_args
              else []
          ):
              self._low = array_ops.identity(low, name="low")
              self._high = array_ops.identity(high, name="high")
              check_ops.assert_same_float_dtype([self._low, self._high])
      super(Uniform, self).__init__(
          dtype=self._low.dtype,
          reparameterization_type=distribution.FULLY_REPARAMETERIZED,
          validate_args=validate_args,
          allow_nan_stats=allow_nan_stats,
          parameters=parameters,
          graph_parents=[self._low, self._high],
          name=name,
      )
  
imports: import math
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops.distributions import distribution
  from tensorflow.python.util import deprecation
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new Uniform object from inherited base classes: distribution with example: obj = Uniform(low, high, validate_args, allow_nan_stats, name)