Rate this Page
★ ★ ★ ★ ★

Sampler#

class torchrl.data.replay_buffers.Sampler(*args, **kwargs)#

A generic sampler base class for composable Replay Buffers.

can_sample(storage: Storage, batch_size: int) → bool[source]#

Returns whether the sampler can draw the requested batch.