捷徑

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 的完整開發人員文件

檢視文件

教學

取得初學者和進階開發人員的深入教學

檢視教學

資源

尋找開發資源並獲得解答

檢視資源