amplitude_tanh#

hypercoil.functional.activation.amplitude_tanh(input: Tensor) Tensor[source]#

Hyperbolic tangent activation function applied to the amplitude only.

The amplitude (absolute value) of the input is transformed according to

\(\mathrm{tanh} x\)

while the phase (complex argument) is preserved. This function maps the complex plane to the open unit disc: the origin is mapped to itself and distant regions of the complex plane are mapped to the circumference.

Dimension:

As this activation function is applied elementwise, it conserves dimension; the output will be of the same shape as the input.

Parameters:
inputTensor

Tensor whose amplitude is to be transformed elementwise by the hyperbolic tangent activation function.

Returns:
outTensor

Transformed input tensor.