torchrl.objectives.symexp#
- torchrl.objectives.symexp(x: Tensor) Tensor[source]#
Apply the inverse of
symlog()element-wise.- Parameters:
x (torch.Tensor) – Input tensor.
- Returns:
A tensor with the same shape, dtype, and device as
x.
Examples
>>> import torch >>> from torchrl.objectives import symexp, symlog >>> x = torch.tensor([-1000.0, 0.0, 1000.0]) >>> torch.allclose(symexp(symlog(x)), x, atol=1e-4) True