SoftplusTransform#
- class pytorch_forecasting.data.encoders.SoftplusTransform(cache_size=0)[source]#
Bases:
TransformTransform via the mapping \(\text{Softplus}(x) = \log(1 + \exp(x))\). The implementation reverts to the linear function when \(x > 20\).
- Inherited-members:
Methods
forward_shape(shape)Infers the shape of the forward computation, given the input shape.
inverse_shape(shape)Infers the shapes of the inverse computation, given the output shape.
log_abs_det_jacobian(x, y)Computes the log det jacobian log |dy/dx| given input and output.
with_cache([cache_size])Attributes
bijectivecodomaindomainevent_diminvReturns the inverse
Transformof this transform.sign