TensorDictRoundRobinWriter¶ class torchrl.data.replay_buffers.TensorDictRoundRobinWriter(compilable: bool = False)[源码]¶ 用于可组合的、基于 tensordict 的回放缓冲区的轮询写入器类。 add(data: Any) → int | torch.Tensor[源码]¶ 将一条数据插入到适当的索引,并返回该索引。 extend(data: Sequence) → Tensor[源码]¶ 将一系列数据点插入到适当的索引,并返回包含这些索引的张量。