Fully Complex Activation Functions

These activation functions are fully-complex, meaning they fit neither the Split Type-A or Split Type-B designation.

class complextorch.nn.modules.activation.fully_complex.CVCardiod

Cardiod Activation Function

Implements the operation:

\[G(z) = \frac{1}{2} (1 + \text{cos}(\angle\mathbf{z})) \odot \mathbf{z}\]

Based on work from the following papers:

Patrick Virtue, Stella X. Yu, Michael Lustig. Better than Real: Complex-valued Neural Nets for MRI Fingerprinting.

J. A. Barrachina, C. Ren, G. Vieillard, C. Morisseau, and J.-P. Ovarlez. Theory and Implementation of Complex-Valued Neural Networks.

forward(input: CVTensor) CVTensor

Computes the complex-valued cardioid activation function.

Parameters:

input (CVTensor) – input tensor

Returns:

\(\frac{1}{2} (1 + \text{cos}(\angle\mathbf{z})) \odot \mathbf{z}\)

Return type:

CVTensor

class complextorch.nn.modules.activation.fully_complex.CVSigLog(c: float = 1.0, r: float = 1.0)

CVSigLog Activation Function.

Implements the operation:

\[G(\mathbf{z}) = \frac{\mathbf{z}}{(c + 1/r * |\mathbf{z}|)}\]

Based on work from the following paper:

G.M. Georgiou and C. Koutsougeras. Complex domain backpropagation.

forward(input: CVTensor) CVTensor

Computes the complex-valued SigLog activation function.

Parameters:

input (CVTensor) – input tensor

Returns:

\(\frac{\mathbf{z}}{(c + 1/r * |\mathbf{z}|)}\)

Return type:

CVTensor

class complextorch.nn.modules.activation.fully_complex.CVSigmoid

Complex-Valued Sigmoid Activation Function

An extension of the sigmoid activation function to the complex domain.

Implements the operation:

\[G(\mathbf{z}) = \frac{1}{1 + \exp{(\mathbf{z})}}.\]

Based on work from the following paper:

T Nitta, Y Kuroe. Hyperbolic Gradient Operator and Hyperbolic Back-Propagation Learning Algorithms.

forward(input: CVTensor) CVTensor

Computes the complex-valued sigmoid activation function.

Parameters:

input (CVTensor) – input tensor

Returns:

\(\frac{1}{1 + \exp{(\mathbf{z})}}\)

Return type:

CVTensor

class complextorch.nn.modules.activation.fully_complex.zReLU

Guberman ReLU

Implements the operation:

\[\begin{split}G(\mathbf{z}) = \begin{cases} \mathbf{z} \quad \text{if} \quad \angle\mathbf{z} \in [0, \pi/2] \\ 0 \quad \text{else} \end{cases}\end{split}\]

Based on work from the following papers:

Nitzan Guberman. On complex valued convolutional neural networks.

Deep Complex Networks.

J. A. Barrachina, C. Ren, G. Vieillard, C. Morisseau, and J.-P. Ovarlez. Theory and Implementation of Complex-Valued Neural Networks.

forward(input: CVTensor) CVTensor

Computes the complex-valued Guberman ReLU.

Parameters:

input (CVTensor) – input tensor

Returns:

\(\begin{cases} \mathbf{z} \quad \text{if} \quad \angle\mathbf{z} \in [0, \pi/2] \\ 0 \quad \text{else} \end{cases}\)

Return type:

CVTensor