View source on GitHub |
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').
|