class_docstr: Scalar `Deterministic` distribution on the real line.
  
  The scalar `Deterministic` distribution is parameterized by a [batch] point
  `loc` on the real line.  The distribution is supported at this point only,
  and corresponds to a random variable that is constant, equal to `loc`.
  
  See [Degenerate rv](https://en.wikipedia.org/wiki/Degenerate_distribution).
  
  #### Mathematical Details
  
  The probability mass function (pmf) and cumulative distribution function (cdf)
  are
  
  ```none
  pmf(x; loc) = 1, if x == loc, else 0
  cdf(x; loc) = 1, if x >= loc, else 0
  ```
  
  #### Examples
  
  ```python
  # Initialize a single Deterministic supported at zero.
  constant = tfp.distributions.Deterministic(0.)
  constant.prob(0.)
  ==> 1.
  constant.prob(2.)
  ==> 0.
  
  # Initialize a [2, 2] batch of scalar constants.
  loc = [[0., 1.], [2., 3.]]
  x = [[0., 1.1], [1.99, 3.]]
  constant = tfp.distributions.Deterministic(loc)
  constant.prob(x)
  ==> [[1., 0.], [0., 1.]]
  ```
class_docstr_tok: ["Scalar","`","Deterministic","`","distribution","on","the","real","line",".","The","scalar","`","Deterministic","`","distribution","is","parameterized","by","a","[","batch","]","point","`","loc","`","on","the","real","line",".","The","distribution","is","supported","at","this","point","only",",","and","corresponds","to","a","random","variable","that","is","constant",",","equal","to","`","loc","`",".","See","[","Degenerate","rv","]","(","https",":","\/\/en.wikipedia.org\/wiki\/Degenerate_distribution",")",".","#","#","#","#","Mathematical","Details","The","probability","mass","function","(","pmf",")","and","cumulative","distribution","function","(","cdf",")","are","``","`","none","pmf","(","x",";","loc",")","=","1",",","if","x","==","loc",",","else","0","cdf","(","x",";","loc",")","=","1",",","if","x",">","=","loc",",","else","0","``","`","#","#","#","#","Examples","``","`","python","#","Initialize","a","single","Deterministic","supported","at","zero",".","constant","=","tfp.distributions.Deterministic","(","0",".",")","constant.prob","(","0",".",")","==",">","1",".","constant.prob","(","2",".",")","==",">","0",".","#","Initialize","a","[","2",",","2","]","batch","of","scalar","constants",".","loc","=","[","[","0.",",","1",".","]",",","[","2.",",","3",".","]","]","x","=","[","[","0.",",","1.1","]",",","[","1.99",",","3",".","]","]","constant","=","tfp.distributions.Deterministic","(","loc",")","constant.prob","(","x",")","==",">","[","[","1.",",","0",".","]",",","[","0.",",","1",".","]","]","``","`"]
docstr: Initialize a scalar `Deterministic` distribution.
  
  The `atol` and `rtol` parameters allow for some slack in `pmf`, `cdf`
  computations, e.g. due to floating-point error.
  
  ```
  pmf(x; loc)
    = 1, if Abs(x - loc) <= atol + rtol * Abs(loc),
    = 0, otherwise.
  ```
  
  Args:
    loc: Numeric `Tensor` of shape `[B1, ..., Bb]`, with `b >= 0`.
      The point (or batch of points) on which this distribution is supported.
    atol:  Non-negative `Tensor` of same `dtype` as `loc` and broadcastable
      shape.  The absolute tolerance for comparing closeness to `loc`.
      Default is `0`.
    rtol:  Non-negative `Tensor` of same `dtype` as `loc` and broadcastable
      shape.  The relative tolerance for comparing closeness to `loc`.
      Default is `0`.
    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.
docstr_tok: ["Initialize","a","scalar","`","Deterministic","`","distribution",".","The","`","atol","`","and","`","rtol","`","parameters","allow","for","some","slack","in","`","pmf","`",",","`","cdf","`","computations",",","e.g",".","due","to","floating-point","error",".","``","`","pmf","(","x",";","loc",")","=","1",",","if","Abs","(","x","-","loc",")","<","=","atol","+","rtol","*","Abs","(","loc",")",",","=","0",",","otherwise",".","``","`","Args",":","loc",":","Numeric","`","Tensor","`","of","shape","`","[","B1",",","...",",","Bb","]","`",",","with","`","b",">","=","0","`",".","The","point","(","or","batch","of","points",")","on","which","this","distribution","is","supported",".","atol",":","Non-negative","`","Tensor","`","of","same","`","dtype","`","as","`","loc","`","and","broadcastable","shape",".","The","absolute","tolerance","for","comparing","closeness","to","`","loc","`",".","Default","is","`","0","`",".","rtol",":","Non-negative","`","Tensor","`","of","same","`","dtype","`","as","`","loc","`","and","broadcastable","shape",".","The","relative","tolerance","for","comparing","closeness","to","`","loc","`",".","Default","is","`","0","`",".","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","."]
code: def __init__(
      self,
      loc,
      atol=None,
      rtol=None,
      validate_args=False,
      allow_nan_stats=True,
      name="Deterministic",
  ):
      """Initialize a scalar `Deterministic` distribution.
  
      The `atol` and `rtol` parameters allow for some slack in `pmf`, `cdf`
      computations, e.g. due to floating-point error.
  
      ```
      pmf(x; loc)
        = 1, if Abs(x - loc) <= atol + rtol * Abs(loc),
        = 0, otherwise.
      ```
  
      Args:
        loc: Numeric `Tensor` of shape `[B1, ..., Bb]`, with `b >= 0`.
          The point (or batch of points) on which this distribution is supported.
        atol:  Non-negative `Tensor` of same `dtype` as `loc` and broadcastable
          shape.  The absolute tolerance for comparing closeness to `loc`.
          Default is `0`.
        rtol:  Non-negative `Tensor` of same `dtype` as `loc` and broadcastable
          shape.  The relative tolerance for comparing closeness to `loc`.
          Default is `0`.
        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.
      """
      parameters = dict(locals())
      super(Deterministic, self).__init__(
          loc,
          atol=atol,
          rtol=rtol,
          validate_args=validate_args,
          allow_nan_stats=allow_nan_stats,
          parameters=parameters,
          name=name,
      )
  
imports: import abc
  import six
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import pad
  from tensorflow_probability.python.bijectors import reshape
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import kullback_leibler
  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 tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 1 to create a new Deterministic object from inherited base classes: _BaseDeterministic with example: obj = Deterministic(loc, atol, rtol, validate_args, allow_nan_stats, name)