TensorDictRecorder¶
- torchrl.record.TensorDictRecorder(out_file_base: str, skip_reset: bool = True, skip: int = 4, in_keys: Sequence[str] | None = None) None[原始碼]¶
TensorDict 錄製器。
當呼叫“dump”方法時,此類會將
env.step(td)產生的 tensordict 堆疊儲存在一個檔案中,該檔案的字首由 out_file_base 引數定義。- 引數:
out_file_base (str) – 定義將寫入 tensordict 的檔案字首的字串。
skip_reset (bool) – 如果為
True,則將丟棄列表中的第一個 TensorDict(通常是呼叫env.reset()產生的 tensordict),預設為 True。skip (int) – 要儲存的 tensordict 的幀間隔。預設為 4。