快捷方式

DreamerActor

class torchrl.modules.DreamerActor(out_features, depth=4, num_cells=200, activation_class=<class 'torch.nn.modules.activation.ELU'>, std_bias=5.0, std_min_val=0.0001)[source]

Dreamer actor 網路。

該網路用於在當前時間步預測給定隨機狀態和確定性信念的動作分佈。它輸出動作分佈的均值和尺度。

參考: https://arxiv.org/abs/1912.01603

引數:
  • out_features (int) – 輸出特徵的數量。

  • depth (int, optional) – 隱藏層數量。預設為 4。

  • num_cells (int, optional) – 每層的隱藏單元數量。預設為 200。

  • activation_class (nn.Module, optional) – 啟用類。預設為 nn.ELU。

  • std_bias (float, optional) – softplus 變換的偏置。預設為 5.0。

  • std_min_val (float, optional) – 標準差的最小值。預設為 1e-4。

forward(state, belief)[source]

定義每次呼叫時執行的計算。

所有子類都應重寫此方法。

注意

儘管前向傳播的實現需要在此函式中定義,但您應該在之後呼叫 Module 例項而不是此函式,因為前者會處理註冊的鉤子,而後者則會靜默忽略它們。

文件

訪問全面的 PyTorch 開發者文件

檢視文件

教程

為初學者和高階開發者提供深入的教程

檢視教程

資源

查詢開發資源並讓您的問題得到解答

檢視資源