avalanche.training.ExemplarsBuffer

class avalanche.training.ExemplarsBuffer(max_size: int)[source]

ABC for rehearsal buffers to store exemplars.

self.buffer is an AvalancheDataset of samples collected from the previous experiences. The buffer can be updated by calling self.update(strategy).

__init__(max_size: int)[source]

Init.

Parameters

max_size – max number of input samples in the replay memory.

Methods

__init__(max_size)

Init.

resize(strategy, new_size)

Update the maximum size of the buffer.

update(strategy, **kwargs)

Update self.buffer using the strategy state.

Attributes

buffer

Buffer of samples.

max_size

Maximum size of the buffer.