netket.sampler.samplesΒΆ

netket.sampler.samples(sampler, machine, parameters, *, state=None, chain_length=1)ΒΆ

Returns a generator sampling 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 signature f(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).

Return type

Iterator[ndarray]