torchrl.storage package

Submodules

torchrl.storage.gpu_replay_buffer module

class torchrl.storage.gpu_replay_buffer.GPUReplayBuffer(state_shape, action_shape, size=1000000)[source]

Bases: object

This class implements a GPU-ready replay buffer

cuda()[source]
push(state, action, reward, next_state, done)[source]
sample(batch_size)[source]

torchrl.storage.prioritized_replay_buffer module

class torchrl.storage.prioritized_replay_buffer.PrioritizedReplayBuffer(size=1000000, epsilon=0.01, alpha=0.6, beta=0.4, num_steps=1000000)[source]

Bases: torchrl.storage.replay_buffer.ReplayBuffer

clear()[source]
compute_max_prob()[source]
extend(*items)[source]
push(item)[source]
sample(batch_size)[source]
update_probs(indices: numpy.array, td_error: numpy.array)[source]

torchrl.storage.replay_buffer module

class torchrl.storage.replay_buffer.ReplayBuffer(size=1000000)[source]

Bases: object

clear()[source]
extend(*items)[source]
push(item)[source]
sample(batch_size)[source]

Module contents