parameters: (self,
                 distribution,
                 low=None,
                 high=None,
                 validate_args=False,
                 name="QuantizedDistribution")
docstring: Construct a Quantized Distribution representing `Y = ceiling(X)`.
  
      Some properties are inherited from the distribution defining `X`. Example:
      `allow_nan_stats` is determined for this `QuantizedDistribution` by reading
      the `distribution`.
  
      Args:
        distribution:  The base distribution class to transform. Typically an
          instance of `Distribution`.
        low: `Tensor` with same `dtype` as this distribution and shape
          able to be added to samples. Should be a whole number. Default `None`.
          If provided, base distribution's `prob` should be defined at
          `low`.
        high: `Tensor` with same `dtype` as this distribution and shape
          able to be added to samples. Should be a whole number. Default `None`.
          If provided, base distribution's `prob` should be defined at
          `high - 1`.
          `high` must be strictly greater than `low`.
        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.
        name: Python `str` name prefixed to Ops created by this class.
  
      Raises:
        TypeError: If `dist_cls` is not a subclass of
            `Distribution` or continuous.
        NotImplementedError:  If the base distribution does not implement `cdf`.
docstring_summary: Construct a Quantized Distribution representing `Y = ceiling(X)`.
docstring_tokens: Construct a Quantized Distribution representing Y = ceiling ( X ) .
function: def __init__(self,
                 distribution,
                 low=None,
                 high=None,
                 validate_args=False,
                 name="QuantizedDistribution"):
      """Construct a Quantized Distribution representing `Y = ceiling(X)`.
  
      Some properties are inherited from the distribution defining `X`. Example:
      `allow_nan_stats` is determined for this `QuantizedDistribution` by reading
      the `distribution`.
  
      Args:
        distribution:  The base distribution class to transform. Typically an
          instance of `Distribution`.
        low: `Tensor` with same `dtype` as this distribution and shape
          able to be added to samples. Should be a whole number. Default `None`.
          If provided, base distribution's `prob` should be defined at
          `low`.
        high: `Tensor` with same `dtype` as this distribution and shape
          able to be added to samples. Should be a whole number. Default `None`.
          If provided, base distribution's `prob` should be defined at
          `high - 1`.
          `high` must be strictly greater than `low`.
        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.
        name: Python `str` name prefixed to Ops created by this class.
  
      Raises:
        TypeError: If `dist_cls` is not a subclass of
            `Distribution` or continuous.
        NotImplementedError:  If the base distribution does not implement `cdf`.
      """
      parameters = dict(locals())
      values = (
          list(distribution.parameters.values()) +
          [low, high])
      with ops.name_scope(name, values=values) as name:
        self._dist = distribution
  
        if low is not None:
          low = ops.convert_to_tensor(low, name="low")
        if high is not None:
          high = ops.convert_to_tensor(high, name="high")
        check_ops.assert_same_float_dtype(
            tensors=[self.distribution, low, high])
  
        # We let QuantizedDistribution access _graph_parents since this class is
        # more like a baseclass.
        graph_parents = self._dist._graph_parents  # pylint: disable=protected-access
  
        checks = []
        if validate_args and low is not None and high is not None:
          message = "low must be strictly less than high."
          checks.append(
              check_ops.assert_less(
                  low, high, message=message))
        self._validate_args = validate_args  # self._check_integer uses this.
        with ops.control_dependencies(checks if validate_args else []):
          if low is not None:
            self._low = self._check_integer(low)
            graph_parents += [self._low]
          else:
            self._low = None
          if high is not None:
            self._high = self._check_integer(high)
            graph_parents += [self._high]
          else:
            self._high = None
  
      super(QuantizedDistribution, self).__init__(
          dtype=self._dist.dtype,
          reparameterization_type=distributions.NOT_REPARAMETERIZED,
          validate_args=validate_args,
          allow_nan_stats=self._dist.allow_nan_stats,
          parameters=parameters,
          graph_parents=graph_parents,
          name=name)
function_tokens: def __init__ ( self , distribution , low = None , high = None , validate_args = False , name = "QuantizedDistribution" ) : parameters = dict ( locals ( ) ) values = ( list ( distribution . parameters . values ( ) ) + [ low , high ] ) with ops . name_scope ( name , values = values ) as name : self . _dist = distribution if low is not None : low = ops . convert_to_tensor ( low , name = "low" ) if high is not None : high = ops . convert_to_tensor ( high , name = "high" ) check_ops . assert_same_float_dtype ( tensors = [ self . distribution , low , high ] ) # We let QuantizedDistribution access _graph_parents since this class is # more like a baseclass. graph_parents = self . _dist . _graph_parents # pylint: disable=protected-access checks = [ ] if validate_args and low is not None and high is not None : message = "low must be strictly less than high." checks . append ( check_ops . assert_less ( low , high , message = message ) ) self . _validate_args = validate_args # self._check_integer uses this. with ops . control_dependencies ( checks if validate_args else [ ] ) : if low is not None : self . _low = self . _check_integer ( low ) graph_parents += [ self . _low ] else : self . _low = None if high is not None : self . _high = self . _check_integer ( high ) graph_parents += [ self . _high ] else : self . _high = None super ( QuantizedDistribution , self ) . __init__ ( dtype = self . _dist . dtype , reparameterization_type = distributions . NOT_REPARAMETERIZED , validate_args = validate_args , allow_nan_stats = self . _dist . allow_nan_stats , parameters = parameters , graph_parents = graph_parents , name = name )