SoftplusTransform#

class pytorch_forecasting.data.encoders.SoftplusTransform(cache_size=0)[source]#

Bases: Transform

Transform 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

bijective

codomain

domain

event_dim

inv

Returns the inverse Transform of this transform.

sign

log_abs_det_jacobian(x, y)[source]#

Computes the log det jacobian log |dy/dx| given input and output.