netket.sampler.sampleΒΆ
-
netket.sampler.
sample
(sampler, machine, parameters, *, state=None, chain_length=1)ΒΆ Samples chain_length batches of samples along the chains.
- Parameters
sampler (
Sampler
) β The Monte Carlo 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.chain_length (
int
) β The length of the chains (default = 1).
- Returns
The generated batches of samples. state: The new state of the sampler.
- Return type
Ο