netket.sampler.sample_nextΒΆ
-
netket.sampler.
sample_next
(sampler, machine, parameters, state=None)ΒΆ Samples the next state in the Markov chain.
- Parameters
sampler (
MetropolisSampler
) β The Metropolis sampler.machine (
Union
[Callable
,Module
]) β A Flax module or callable with the forward pass of the log-pdf. If it is a callable, it should have the signaturef(parameters, Ο) -> jnp.ndarray
.parameters (
Any
) β The PyTree of parameters of the model.state (
Optional
[SamplerState
]) β The current state of the sampler. If not specified, then initialize and reset it.
- Returns
The new state of the sampler. Ο: The next batch of samples.
- Return type
state