def __init__(self,<EOL>loc,<EOL>scale,<EOL>quadrature_size=<NUM_LIT:8>,<EOL>quadrature_fn=quadrature_scheme_lognormal_quantiles,<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>dtype = dtype_util.common_dtype([loc, scale], tf.float32)<EOL>if loc is not None:<EOL><INDENT>loc = tf.convert_to_tensor(value=loc, name="<STR_LIT>", dtype=dtype)<EOL><DEDENT>if scale is not None:<EOL><INDENT>scale = tf.convert_to_tensor(value=scale, dtype=dtype, name="<STR_LIT>")<EOL><DEDENT>self._quadrature_grid, self._quadrature_probs = tuple(quadrature_fn(<EOL>loc, scale, quadrature_size, validate_args))<EOL>dt = self._quadrature_grid.dtype<EOL>if not dtype_util.base_equal(dt, self._quadrature_probs.dtype):<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>".format(<EOL>dtype_util.name(dt),<EOL>dtype_util.name(self._quadrature_probs.dtype)))<EOL><DEDENT>self._distribution = poisson.Poisson(<EOL>log_rate=self._quadrature_grid,<EOL>validate_args=validate_args,<EOL>allow_nan_stats=allow_nan_stats)<EOL>self._mixture_distribution = categorical.Categorical(<EOL>logits=tf.math.log(self._quadrature_probs),<EOL>validate_args=validate_args,<EOL>allow_nan_stats=allow_nan_stats)<EOL>self._loc = loc<EOL>self._scale = scale<EOL>self._quadrature_size = quadrature_size<EOL>super(PoissonLogNormalQuadratureCompound, self).__init__(<EOL>dtype=dt,<EOL>reparameterization_type=reparameterization.NOT_REPARAMETERIZED,<EOL>validate_args=validate_args,<EOL>allow_nan_stats=allow_nan_stats,<EOL>parameters=parameters,<EOL>graph_parents=[loc, scale],<EOL>name=name)<EOL><DEDENT>
Constructs the PoissonLogNormalQuadratureCompound`.

        Note: `probs` returned by (optional) `quadrature_fn` are presumed to be
        either a length-`quadrature_size` vector or a batch of vectors in 1-to-1
        correspondence with the returned `grid`. (I.e., broadcasting is only
        partially supported.)

        Args:
          loc: `float`-like (batch of) scalar `Tensor`; the location parameter of
            the LogNormal prior.
          scale: `float`-like (batch of) scalar `Tensor`; the scale parameter of
            the LogNormal prior.
          quadrature_size: Python `int` scalar representing the number of quadrature
            points.
          quadrature_fn: Python callable taking `loc`, `scale`,
            `quadrature_size`, `validate_args` and returning `tuple(grid, probs)`
            representing the LogNormal grid and corresponding normalized weight.
            normalized) weight.
            Default value: `quadrature_scheme_lognormal_quantiles`.
          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.

        Raises:
          TypeError: if `quadrature_grid` and `quadrature_probs` have different base
            `dtype`.