tfp.experimental.mcmc.WeightedParticles Stay organized with collections Save and categorize content based on your preferences.
Particles with corresponding log weights.
tfp.experimental.mcmc.WeightedParticles( particles, log_weights )
This structure serves as the state for the SequentialMonteCarlo transition kernel.
Elements |
particles | a (structure of) Tensor(s) each of shape concat([[num_particles, b1, ..., bN], event_shape]), where event_shape may differ across component Tensors. |
log_weights | float Tensor of shape [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 particles to 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 of size num_steps.
Attributes |
particles | A namedtuple alias for field number 0 |
log_weights | A namedtuple alias for field number 1 |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-21 UTC."],[],[]]