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]¶ 将一系列数据点插入到适当的索引,并返回包含这些索引的张量。