快捷方式

TanhDelta

class torchrl.modules.TanhDelta(param: torch.Tensor, low: torch.Tensor | float = - 1.0, high: torch.Tensor | float = 1.0, event_dims: int = 1, atol: float = 1e-06, rtol: float = 1e-06, safe: bool = True)[原始碼]

實現一個 Tanh 變換的 Delta 分佈。

引數:
  • param (torch.Tensor) – Delta 分佈的引數;

  • low (torch.Tensor數字, 可選) – 分佈的最小值。預設為 -1.0;

  • high (torch.Tensor數字, 可選) – 分佈的最大值。預設為 1.0;

  • event_dims (int, 可選) – 描述動作的維度數。預設為 1;

  • atol (數字, 可選) – 用於判斷張量是否匹配分佈引數的絕對容差;預設為 1e-6

  • rtol (數字, 可選) – 用於判斷張量是否匹配分佈引數的相對容差;預設為 1e-6

  • batch_shape (torch.Size, 可選) – batch 形狀;

  • event_shape (torch.Size, 可選) – 結果的形狀;

property mean: Tensor

返回分佈的均值。

property mode: Tensor

返回分佈的眾數。

文件

訪問全面的 PyTorch 開發者文件

檢視文件

教程

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

檢視教程

資源

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

檢視資源