symexp#
- class torchrl.modules.functional.symexp(value: Tensor)[source]#
Apply the inverse symmetric exponential transform element-wise.
- Parameters:
value (torch.Tensor) – Input tensor in symmetric-log space.
- Returns:
A tensor with the same shape, dtype, and device as
value.
Examples
>>> import torch >>> from torchrl.modules import functional as F >>> value = torch.tensor([-100.0, 0.0, 100.0]) >>> transformed = F.symlog(value) >>> transformed tensor([-4.6151, 0.0000, 4.6151]) >>> F.symexp(transformed) tensor([-100.0000, 0.0000, 100.0000])
See also
symlog()for the forward operation andSymLogValueTransformfor the module form.