捷徑

TanhDelta

class torchrl.modules.TanhDelta(param: Tensor, low: Union[Tensor, float] = - 1.0, high: Union[Tensor, float] = 1.0, event_dims: int = 1, atol: float = 1e-06, rtol: float = 1e-06)[source]

實現 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, 選擇性) – 批次形狀;

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

property mean: Tensor

返回分布的平均值。

property mode: Tensor

返回分布的眾數。

文件

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources