Softplus
- class pmrf.stats.bijectors.Softplus(_is_constant_jacobian: bool = False, _is_constant_log_det: bool = False)
Bases:
AbstractForwardInverseBijector,AbstractInvLogDetJacBijector,AbstractFwdLogDetJacBijectorTransforms the real line to the positive domain using softplus y = log(1 + exp(x)).
- forward_and_log_det(x: Array) tuple[Array, Array]
Computes y = softplus(x) and log|det J(f)(x)|.
- inverse_and_log_det(y: Array) tuple[Array, Array]
Computes x = softplus^{-1}(y) and log|det J(f^{-1})(y)|.
- same_as(other: AbstractBijector) bool
Returns True if this bijector is guaranteed to be the same as other.