boax.core.samplers.normal

Contents

boax.core.samplers.normal#

boax.core.samplers.normal(key, sample_shape)#

The i.i.d. normal sampler.

Example

>>> sampler = normal(key, (128,))
>>> samples = sampler(Normal(0, 1))
Parameters:
  • key (Array) – The pseudo-random number genererator key.

  • sample_shape (Sequence[Union[int, Any]]) – The sample shape.

Return type:

Sampler[Normal]

Returns:

The corresponding Sampler.