netket.sampler.resetΒΆ
-
netket.sampler.
reset
(sampler, machine, parameters, state=None)ΒΆ Resets the state of the sampler. To be used every time the parameters are changed.
- 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, it will be constructed by callingsampler.init_state(machine, parameters)
with a random seed.
- Return type
- Returns
A valid sampler state.