TensorDictRoundRobinWriter¶ class torchrl.data.replay_buffers.TensorDictRoundRobinWriter(compilable: bool = False)[source]¶ 用於可組合的、基於 tensordict 的回放緩衝區的 RoundRobin Writer 類。 add(data: Any) → int | torch.Tensor[source]¶ 在適當的索引處插入一條資料,並返回該索引。 extend(data: Sequence) → Tensor[source]¶ 在適當的索引處插入一系列資料點,並返回一個包含這些索引的張量。