emmi.functional.logscale

Functions

to_logscale(x)

Turns a tensor into log scale. Log is the natural logarithm of x + 1 .

from_logscale(x)

Turns a tensor from log scale into orginal scale.

Module Contents

emmi.functional.logscale.to_logscale(x)

Turns a tensor into log scale. Log is the natural logarithm of x + 1 .

Parameters:

x (torch.Tensor) – Tensor to be transformed

Returns:

Tensor in log scale

Return type:

torch.Tensor

emmi.functional.logscale.from_logscale(x)
Turns a tensor from log scale into orginal scale.

x = from_logscale(to_logscale(x))

Parameters:

x (torch.Tensor) – Tensor to be de-transformed from log scale. Expected to be in natural logarithm + 1.

Returns:

Tensor in orginal scale

Return type:

torch.Tensor