xpag.samplers.jax_sampler.RBUniformSampling#

class RBUniformSampling(dummy_data_sample)#

Bases: Generic[Sample]

Uniform sampling in the Replay buffer.

  • It performs uniform random sampling with replacement of a batch of size batch_size

Methods

sample

Sample a batch of data.

sample(buffer_state, batch_size)#

Sample a batch of data. :type buffer_state: ReplayBufferState :param buffer_state: Buffer state :type batch_size: int :param batch_size: size of the batch

Return type:

Tuple[ReplayBufferState, Array]

Returns:

New buffer state and a batch with leading dimension ‘sample_batch_size’.