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, 可選) – 結果的形狀;