快捷方式

TensorDictRecorder

torchrl.record.TensorDictRecorder(out_file_base: str, skip_reset: bool = True, skip: int = 4, in_keys: Optional[Sequence[str]] = 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

文件

存取 PyTorch 的全面開發者文件

檢視文件

教學

取得適合初學者和進階開發者的深入教學

檢視教學

資源

尋找開發資源並獲得問題解答

檢視資源