Softmax Functions
- class complextorch.nn.modules.softmax.CVSoftMax(dim: int | None = None)
Split Complex-Valued Softmax Layer
Simple real/image split softmax function. Applies SoftMax to the real and imaginary parts of the input tensor.
Note: this naive implementation can cause significant phase changes and the relationship between the real and iamginary parts of the complex-valued signal are ignored in the two SoftMax computations.
Implements the following operation:
\[G(\mathbf{z}) = \texttt{SoftMax}(\mathbf{x}) + j \texttt{SoftMax}(\mathbf{y}),\]where \(\mathbf{z} = \mathbf{x} + j\mathbf{y}\)
- class complextorch.nn.modules.softmax.MagSoftMax(dim: int | None = None)
Magnitude Softmax Layer
Ignores phase and applies SoftMax to the magnitude.
Implements the following operation:
\[G(\mathbf{z}) = \texttt{SoftMax}(|\mathbf{z}|)\]