Writer¶ class torchrl.data.replay_buffers.Writer(compilable: bool = False)[原始碼]¶ ReplayBuffer 的基類 Writer。 abstract add(data: Any) → int[原始碼]¶ 將一條資料插入到適當的索引,並返回該索引。 abstract extend(data: Sequence) → Tensor[原始碼]¶ 將一系列資料點插入到適當的索引,並返回包含這些索引的張量。