RoundRobinWriter¶
- class torchrl.data.replay_buffers.RoundRobinWriter(compilable: bool = False)[原始碼]¶
用於可組合回放緩衝區的 RoundRobin Writer 類。
- 引數:
compilable (bool, optional) – 寫入器是否可編譯。如果為
True,則寫入器不能在多個程序之間共享。預設為False。
- add(data: Any) int | torch.Tensor[原始碼]¶
將一條資料插入到適當的索引,並返回該索引。