Skip to content

jaxpi.samplers

Infinite collocation-point samplers.

BaseSampler [source]

Infinite iterator over randomly generated batches.

The global batch is sharded across devices by the training step, so the batch size must be divisible by the number of devices.

BaseSampler.data_generation() [source]

python
BaseSampler.data_generation(self, key)

UniformSampler [source]

Bases: BaseSampler

Infinite iterator over randomly generated batches.

The global batch is sharded across devices by the training step, so the batch size must be divisible by the number of devices.

UniformSampler.data_generation()

python
UniformSampler.data_generation(self, key)

Generates data containing batch_size samples

MeshSampler [source]

Bases: BaseSampler

Infinite iterator over randomly generated batches.

The global batch is sharded across devices by the training step, so the batch size must be divisible by the number of devices.

MeshSampler.data_generation()

python
MeshSampler.data_generation(self, key)

Generates data containing batch_size samples.

TemporalMeshSampler [source]

Bases: BaseSampler

Infinite iterator over randomly generated batches.

The global batch is sharded across devices by the training step, so the batch size must be divisible by the number of devices.

TemporalMeshSampler.data_generation()

python
TemporalMeshSampler.data_generation(self, key)

Generates data containing batch_size samples

Released under the Apache 2.0 License.