tfp.experimental.mcmc.step_kernel
Stay organized with collections
Save and categorize content based on your preferences.
Takes num_steps
repeated TransitionKernel
steps from current_state
.
tfp.experimental.mcmc.step_kernel(
num_steps,
current_state,
previous_kernel_results=None,
kernel=None,
return_final_kernel_results=False,
parallel_iterations=10,
seed=None,
name=None
)
This is meant to be a minimal driver for executing TransitionKernel
s; for
something more featureful, see sample_chain
.
Args |
num_steps
|
Integer number of Markov chain steps.
|
current_state
|
Tensor or Python list of Tensor s representing the
current state(s) of the Markov chain(s).
|
previous_kernel_results
|
A Tensor or a nested collection of Tensor s.
Warm-start for the auxiliary state needed by the given kernel .
If not supplied, step_kernel will cold-start with
kernel.bootstrap_results .
|
kernel
|
An instance of tfp.mcmc.TransitionKernel which implements one step
of the Markov chain.
|
return_final_kernel_results
|
If True , then the final kernel results are
returned alongside the chain state after num_steps steps are taken.
This can be useful to inspect the final auxiliary state, or for a later
warm restart.
|
parallel_iterations
|
The number of iterations allowed to run in parallel. It
must be a positive integer. See tf.while_loop for more details.
|
seed
|
PRNG seed; see tfp.random.sanitize_seed for details.
|
name
|
Python str name prefixed to Ops created by this function.
Default value: None (i.e., 'mcmc_step_kernel').
|
Returns |
next_state
|
Markov chain state after num_step steps are taken, of
identical type as current_state .
|
final_kernel_results
|
kernel results, as supplied by kernel.one_step after
num_step steps are taken. This is only returned if
return_final_kernel_results is True .
|
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.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "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."],[],[]]