ImmutableDatasetWriter¶ class torchrl.data.replay_buffers.ImmutableDatasetWriter(compilable: bool = False)[原始碼]¶ 一個用於不可變資料集的阻塞寫入器。 add(data: Any) → int[原始碼]¶ 在適當的索引處插入一條資料,並返回該索引。 extend(data: Sequence) → Tensor[原始碼]¶ 在適當的索引處插入一系列資料點,並返回包含這些索引的張量。