lit_sb3.distributions.tanh_bijector
source module lit_sb3.distributions.tanh_bijector
Tanh bijective transformation.
Classes
-
TanhBijector — Bijective transformation of a probability distribution.
source class TanhBijector(epsilon: float = 1e-06)
Bijective transformation of a probability distribution.
using a squashing function (tanh).
Parameters
-
epsilon : float — small value to avoid NaN due to numerical imprecision.
Methods
source staticmethod TanhBijector.forward(x: torch.Tensor) → torch.Tensor
source staticmethod TanhBijector.atanh(x: torch.Tensor) → torch.Tensor
Inverse of Tanh.
Taken from Pyro: https://github.com/pyro-ppl/pyro 0.5 * torch.log((1 + x ) / (1 - x))
source staticmethod TanhBijector.inverse(y: torch.Tensor) → torch.Tensor
Inverse tanh.
Parameters
-
y : torch.Tensor — The output value.
source method TanhBijector.log_prob_correction(x: torch.Tensor) → torch.Tensor