捷徑

NoisyLinear

class torchrl.modules.NoisyLinear(in_features: int, out_features: int, bias: bool = True, device: Optional[Union[device, str, int]] = None, dtype: Optional[dtype] = None, std_init: float = 0.1)[原始碼]

雜訊線性層。

在「用於探索的雜訊網路」中呈現,https://arxiv.org/abs/1706.10295v3

雜訊線性層是一個線性層,其權重添加了參數雜訊。這種誘導的隨機性可用於 RL 網路中,以協助代理程式的策略進行有效的探索。雜訊的參數與任何其他剩餘網路權重一起透過梯度下降學習。分解高斯雜訊是通常採用的雜訊類型。

參數:
  • in_features (int) – 輸入特徵維度

  • out_features (int) – 輸出特徵維度

  • bias (bool, optional) – 如果 True,則會在矩陣乘法中加入一個偏置項:Ax + b。預設值為 True

  • device (DEVICE_TYPING, optional) – 該層的裝置。預設值為 "cpu"

  • dtype (torch.dtype, optional) – 參數的 dtype。預設值為 None (預設的 pytorch dtype)

  • std_init (scalar, optional) – 最佳化之前高斯標準差的初始值。預設值為 0.1

文件

訪問 PyTorch 的綜合開發人員文檔

查看文檔

教程

獲取針對初學者和高級開發人員的深入教程

查看教程

資源

查找開發資源並獲得問題解答

查看資源