|View source on GitHub|
Particles with corresponding log weights.
tfp.experimental.mcmc.WeightedParticles( particles, log_weights )
This structure serves as the
state for the
particles: a (structure of) Tensor(s) each of shape
concat([[num_particles, b1, ..., bN], event_shape]), where
event_shapemay differ across component
[num_particles, b1, ..., bN]containing a log importance weight for each particle, typically normalized so that
exp(reduce_logsumexp(log_weights, axis=0)) == 1.. These must be used in conjunction with
particlesto compute expectations under the target distribution.
In some contexts, particles may be stacked across multiple inference steps,
in which case all
Tensor shapes will be prefixed by an additional dimension