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, safe: bool = True)[source]¶
Implements a Tanh transformed_in Delta distribution.
- Parameters:
param (torch.Tensor) – parameter of the delta distribution;
low (torch.Tensor or number, optional) – minimum value of the distribution. Default is -1.0;
high (torch.Tensor or number, optional) – maximum value of the distribution. Default is 1.0;
event_dims (int, optional) – number of dimensions describing the action. Default is 1;
atol (number, optional) – absolute tolerance to consider that a tensor matches the distribution parameter; Default is 1e-6
rtol (number, optional) – relative tolerance to consider that a tensor matches the distribution parameter; Default is 1e-6
batch_shape (torch.Size, optional) – batch shape;
event_shape (torch.Size, optional) – shape of the outcome;