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 Lazy Linear Layer.
This class makes the Noisy Linear layer lazy, in that the in_feature argument does not need to be passed at initialization (but is inferred after the first call to the layer).
For more context on noisy layers, see the NoisyLinear class.
- Parameters:
out_features (int) – out features dimension
bias (bool, optional) – if
True
, a bias term will be added to the matrix multiplication: Ax + b. Defaults toTrue
.device (DEVICE_TYPING, optional) – device of the layer. Defaults to
"cpu"
.dtype (torch.dtype, optional) – dtype of the parameters. Defaults to the default PyTorch dtype.
std_init (scalar) – initial value of the Gaussian standard deviation before optimization. Defaults to 0.1