xpag.buffers.buffer.Buffer#

class Buffer(buffer_size, sampler)#

Bases: ABC

Base class for buffers

Methods

insert

Inserts a transition in the buffer

sample

Uses the sampler to returns a batch of transitions

abstract insert(step)#

Inserts a transition in the buffer

abstract sample(batch_size)#

Uses the sampler to returns a batch of transitions

Return type:

Dict[str, Union[ndarray, Array]]