class_docstr: Triangular distribution with `low`, `high` and `peak` parameters.
  
  #### Mathematical Details
  
  The Triangular distribution is specified by two line segments in the plane,
  such that:
  
    * The first line segment starts at `(a, 0)` and ends at `(c, z)`.
    * The second line segment starts at `(c, z)` and ends at `(b, 0)`.
  
    ```none
    y
  
    ^
  z |           o  (c,z)
    |          / \
    |         /   \
    |        /     \
    | (a,0) /       \ (b,0)
  0 +------o---------o-------> x
    0      a    c    b
  ```
  
  where:
  * a <= c <= b, a < b
  * `low = a`,
  * `high = b`,
  * `peak = c`,
  * `z = 2 / (b - a)`
  
  The parameters `low`, `high` and `peak` must be shaped in a way that supports
  broadcasting (e.g., `high - low` is a valid operation).
  
  #### Examples
  
  ```python
  import tensorflow_probability as tfp
  tfd = tfp.distributions
  
  # Specify a single Triangular distribution.
  u1 = tfd.Triangular(low=3., high=4., peak=3.5)
  u1.mean()
  # ==> 3.5
  
  # Specify two different Triangular distributions.
  u2 = tfd.Triangular(low=[1., 2.], high=[3., 4.], peak=[2., 3.])
  u2.mean()
  # ==> [2., 3.]
  
  # Specify three different Triangular distributions by leveraging broadcasting.
  u3 = tfd.Triangular(low=3., high=[5., 6., 7.], peak=3.)
  u3.mean()
  # ==> [3.6666, 4., 4.3333]
  ```
docstr: Initialize a batch of Triangular distributions.
  
  Args:
    low: Floating point tensor, lower boundary of the output interval. Must
      have `low < high`.
      Default value: `0`.
    high: Floating point tensor, upper boundary of the output interval. Must
      have `low < high`.
      Default value: `1`.
    peak: Floating point tensor, mode of the output interval. Must have
      `low <= peak` and `peak <= high`.
      Default value: `0.5`.
    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.
      Default value: `False`.
    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.
      Default value: `True`.
    name: Python `str` name prefixed to Ops created by this class.
      Default value: `'Triangular'`.
  
  Raises:
    InvalidArgumentError: if `validate_args=True` and one of the following is
      True:
      * `low >= high`.
      * `peak > high`.
      * `low > peak`.
docstr_tok: ["Initialize","a","batch","of","Triangular","distributions",".","Args",":","low",":","Floating","point","tensor",",","lower","boundary","of","the","output","interval",".","Must","have","`","low","<","high","`",".","Default","value",":","`","0","`",".","high",":","Floating","point","tensor",",","upper","boundary","of","the","output","interval",".","Must","have","`","low","<","high","`",".","Default","value",":","`","1","`",".","peak",":","Floating","point","tensor",",","mode","of","the","output","interval",".","Must","have","`","low","<","=","peak","`","and","`","peak","<","=","high","`",".","Default","value",":","`","0.5","`",".","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",".","Default","value",":","`","False","`",".","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",".","Default","value",":","`","True","`",".","name",":","Python","`","str","`","name","prefixed","to","Ops","created","by","this","class",".","Default","value",":","`","'Triangular","'","`",".","Raises",":","InvalidArgumentError",":","if","`","validate_args=True","`","and","one","of","the","following","is","True",":","*","`","low",">","=","high","`",".","*","`","peak",">","high","`",".","*","`","low",">","peak","`","."]
code: def __init__(
      self,
      low=0.0,
      high=1.0,
      peak=0.5,
      validate_args=False,
      allow_nan_stats=True,
      name="Triangular",
  ):
      """Initialize a batch of Triangular distributions.
  
      Args:
        low: Floating point tensor, lower boundary of the output interval. Must
          have `low < high`.
          Default value: `0`.
        high: Floating point tensor, upper boundary of the output interval. Must
          have `low < high`.
          Default value: `1`.
        peak: Floating point tensor, mode of the output interval. Must have
          `low <= peak` and `peak <= high`.
          Default value: `0.5`.
        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.
          Default value: `False`.
        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.
          Default value: `True`.
        name: Python `str` name prefixed to Ops created by this class.
          Default value: `'Triangular'`.
  
      Raises:
        InvalidArgumentError: if `validate_args=True` and one of the following is
          True:
          * `low >= high`.
          * `peak > high`.
          * `low > peak`.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          dtype = dtype_util.common_dtype([low, high, peak], tf.float32)
          self._low = tensor_util.convert_nonref_to_tensor(
              low, name="low", dtype=dtype
          )
          self._high = tensor_util.convert_nonref_to_tensor(
              high, name="high", dtype=dtype
          )
          self._peak = tensor_util.convert_nonref_to_tensor(
              peak, name="peak", dtype=dtype
          )
          super(Triangular, self).__init__(
              dtype=self._low.dtype,
              reparameterization_type=reparameterization.FULLY_REPARAMETERIZED,
              validate_args=validate_args,
              allow_nan_stats=allow_nan_stats,
              parameters=parameters,
              name=name,
          )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
label_desc: Use image node_id 1 to create a new Triangular object from inherited base classes: distribution with example: obj = Triangular(low, high, peak, validate_args, allow_nan_stats, name)