Magnitude Masking Layers
- class complextorch.nn.modules.mask.ComplexRatioMask
Complex Ratio Mask
\[\texttt{ComplexRatioMask}(\mathbf{z}) = \texttt{Sigmoid}(|\mathbf{z}|) \odot \frac{\mathbf{z}}{|\mathbf{z}|}\]Retains phase and squeezes magnitude using sigmoid function.
Based on work from the following paper:
HW Cho, S Choi, YR Cho, and J Kim: Complex-Valued Channel Attention and Application in Ego-Velocity Estimation With Automotive Radar
- class complextorch.nn.modules.mask.MagMinMaxNorm(dim: int | None = None)
Magnitude Min-Max Normalization Layer
Applies the min-max norm to the input tensor yielding an output whose magnitude is normalized between 0 and 1 over the specified dimension while phase information remains unchanged.
Implements the following operation:
\[\texttt{MagMinMaxNorm}(\mathbf{z}) = \frac{\mathbf{z} - \mathbf{z}_{min}}{\mathbf{z}_{max} - \mathbf{z}_{min}}\]
- class complextorch.nn.modules.mask.PhaseSigmoid(*args, **kwargs)
Phase-Preserving Complex-Valued Sigmoid Layer
\[\texttt{ComplexRatioMask}(\mathbf{z}) = \texttt{Sigmoid}(|\mathbf{z}|) \odot \frac{\mathbf{z}}{|\mathbf{z}|}\]Retains phase and squeezes magnitude using sigmoid function.
Based on work from the following paper:
HW Cho, S Choi, YR Cho, and J Kim: Complex-Valued Channel Attention and Application in Ego-Velocity Estimation With Automotive Radar