NoisyLazyLinear¶
- class torchrl.modules.NoisyLazyLinear(out_features: int, bias: bool = True, device: Optional[Union[device, str, int]] = None, dtype: Optional[dtype] = None, std_init: float = 0.1)[source]¶
帶噪聲的惰性線性層。
此類使 Noisy Linear 層具有惰性,即在初始化時無需傳入 in_feature 引數(而是在首次呼叫該層後推斷得出)。
有關帶噪聲層的更多背景資訊,請參閱 NoisyLinear 類。
- 引數:
out_features (int) – 輸出特徵維度
bias (bool, 可選) – 如果為
True,則會在矩陣乘法中新增一個偏置項:Ax + b。預設為True。device (DEVICE_TYPING, 可選) – 層的裝置。預設為
"cpu"。dtype (torch.dtype, 可選) – 引數的資料型別。預設為預設的 PyTorch 資料型別。
std_init (標量) – 最佳化前高斯標準差的初始值。預設為 0.1