memory_offline

class xuance.common.memory_offline.OfflineBuffer_D4RL(observation_space: gymnasium.Space, action_space: gymnasium.Space, auxiliary_shape: dict | None, n_envs: int, buffer_size: int, batch_size: int)[源代码]

基类:Buffer

Replay buffer for OfflineBuffer DRL algorithms.

参数:
  • observation_space – the observation space of the environment.

  • action_space – the action space of the environment.

  • auxiliary_shape – data shape of auxiliary information (if exists).

  • n_envs – number of parallel environments.

  • buffer_size – the total size of the replay buffer.

  • batch_size – size of transition data for a batch of sample.

clear()[源代码]
d4rl2buffer(dataset)[源代码]
sample(batch_size=None)[源代码]
store(obs, acts, rews, terminals, next_obs)[源代码]