def __init__(self,<EOL>outcomes,<EOL>logits=None,<EOL>probs=None,<EOL>rtol=None,<EOL>atol=None,<EOL>validate_args=False,<EOL>allow_nan_stats=True,<EOL>name='<STR_LIT>'):
parameters = dict(locals())<EOL>with tf.compat.v1.name_scope(<EOL>name, values=[outcomes, logits, probs]) as name:<EOL><INDENT>self._outcomes = tf.convert_to_tensor(value=outcomes, name='<STR_LIT>')<EOL>if validate_args:<EOL><INDENT>assertions = _maybe_validate_args(self._outcomes, logits, probs,<EOL>validate_args)<EOL>with tf.control_dependencies(assertions):<EOL><INDENT>self._outcomes = tf.identity(self._outcomes)<EOL><DEDENT><DEDENT>if dtype_util.is_floating(self._outcomes.dtype):<EOL><INDENT>eps = np.finfo(dtype_util.as_numpy_dtype(self._outcomes.dtype)).eps<EOL>self._rtol = <NUM_LIT:10> * eps if rtol is None else rtol<EOL>self._atol = <NUM_LIT:10> * eps if atol is None else atol<EOL><DEDENT>else:<EOL><INDENT>self._rtol = None<EOL>self._atol = None<EOL><DEDENT>self._categorical = categorical.Categorical(<EOL>logits=logits,<EOL>probs=probs,<EOL>dtype=tf.int32,<EOL>validate_args=validate_args,<EOL>allow_nan_stats=allow_nan_stats)<EOL><DEDENT>super(FiniteDiscrete, self).__init__(<EOL>dtype=self._outcomes.dtype,<EOL>reparameterization_type=reparameterization.NOT_REPARAMETERIZED,<EOL>validate_args=validate_args,<EOL>allow_nan_stats=allow_nan_stats,<EOL>parameters=parameters,<EOL>graph_parents=[<EOL>self._outcomes, self._categorical.logits, self._categorical.probs<EOL>],<EOL>name=name)<EOL>
Construct a finite discrete contribution.

        Args:
          outcomes: A 1-D floating or integer `Tensor`, representing a list of
            possible outcomes in strictly ascending order.
          logits: A floating N-D `Tensor`, `N >= 1`, representing the log
            probabilities of a set of FiniteDiscrete distributions. The first `N -
            1` dimensions index into a batch of independent distributions and the
            last dimension represents a vector of logits for each discrete value.
            Only one of `logits` or `probs` should be passed in.
          probs: A floating  N-D `Tensor`, `N >= 1`, representing the probabilities
            of a set of FiniteDiscrete distributions. The first `N - 1` dimensions
            index into a batch of independent distributions and the last dimension
            represents a vector of probabilities for each discrete value. Only one
            of `logits` or `probs` should be passed in.
          rtol: `Tensor` with same `dtype` as `outcomes`. The relative tolerance for
            floating number comparison. Only effective when `outcomes` is a floating
            `Tensor`. Default is `10 * eps`.
          atol: `Tensor` with same `dtype` as `outcomes`. The absolute tolerance for
            floating number comparison. Only effective when `outcomes` is a floating
            `Tensor`. Default is `10 * eps`.
          validate_args:  Python `bool`, default `False`. When `True` distribution
            parameters are checked for validity despite possibly degrading runtime
            performance. When `False` invalid inputs may 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.