def __init__(self,<EOL>rate=None,<EOL>log_rate=None,<EOL>interpolate_nondiscrete=True,<EOL>validate_args=False,<EOL>allow_nan_stats=True,<EOL>name="<STR_LIT>"):
parameters = dict(locals())<EOL>with tf.name_scope(name) as name:<EOL><INDENT>if (rate is None) == (log_rate is None):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>elif log_rate is None:<EOL><INDENT>rate = tf.convert_to_tensor(<EOL>value=rate,<EOL>name="<STR_LIT>",<EOL>dtype=dtype_util.common_dtype([rate], preferred_dtype=tf.float32))<EOL>if not dtype_util.is_floating(rate.dtype):<EOL><INDENT>raise TypeError("<STR_LIT>".format(<EOL>dtype_util.name(rate.dtype)))<EOL><DEDENT>with tf.control_dependencies(<EOL>[assert_util.assert_positive(rate)] if validate_args else []):<EOL><INDENT>self._rate = tf.identity(rate, name="<STR_LIT>")<EOL>self._log_rate = tf.math.log(rate, name="<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>log_rate = tf.convert_to_tensor(<EOL>value=log_rate,<EOL>name="<STR_LIT>",<EOL>dtype=dtype_util.common_dtype([log_rate], tf.float32))<EOL>if not dtype_util.is_floating(log_rate.dtype):<EOL><INDENT>raise TypeError("<STR_LIT>".format(<EOL>dtype_util.name(log_rate.dtype)))<EOL><DEDENT>self._rate = tf.exp(log_rate, name="<STR_LIT>")<EOL>self._log_rate = tf.convert_to_tensor(value=log_rate, name="<STR_LIT>")<EOL><DEDENT><DEDENT>self._interpolate_nondiscrete = interpolate_nondiscrete<EOL>super(Poisson, self).__init__(<EOL>dtype=self._rate.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=[self._rate],<EOL>name=name)<EOL>
Initialize a batch of Poisson distributions.

        Args:
          rate: Floating point tensor, the rate parameter. `rate` must be positive.
            Must specify exactly one of `rate` and `log_rate`.
          log_rate: Floating point tensor, the log of the rate parameter.
            Must specify exactly one of `rate` and `log_rate`.
          interpolate_nondiscrete: Python `bool`. When `False`,
            `log_prob` returns `-inf` (and `prob` returns `0`) for non-integer
            inputs. When `True`, `log_prob` evaluates the continuous function
            `k * log_rate - lgamma(k+1) - rate`, which matches the Poisson pmf
            at integer arguments `k` (note that this function is not itself
            a normalized probability log-density).
            Default value: `True`.
          validate_args: Python `bool`. 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`. 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.

        Raises:
          ValueError: if none or both of `rate`, `log_rate` are specified.
          TypeError: if `rate` is not a float-type.
          TypeError: if `log_rate` is not a float-type.