class

ExpTransform

extendsTransform
ExpTransform()
source

Element-wise exponential bijection y=exy = e^x.

Maps R(0,)\mathbb{R} \to (0, \infty) element-wise; composed with a Normal base distribution it yields a LogNormal. Monotone increasing, bijective, event_dim = 0.

Notes

Forward: y=exy = e^x.

Inverse: x=logyx = \log y (defined for y>0y > 0).

Log Jacobian determinant (element-wise):

log ⁣yx=x\log\!\left|\frac{\partial y}{\partial x}\right| = x

since dy/dx=ex|dy/dx| = e^x.

Examples

>>> import lucid
>>> from lucid.distributions.transforms import ExpTransform
>>> T = ExpTransform()
>>> x = lucid.tensor(0.0)
>>> y = T(x)
>>> T.log_abs_det_jacobian(x, y)
Tensor(0.0)

Methods (1)

fn

log_abs_det_jacobian

Tensor
log_abs_det_jacobian(x: Tensor, y: Tensor)
source

logy/x=x\log|\partial y/\partial x| = x since dy/dx=ex|dy/dx| = e^x.