Complex-to-complex Discrete Fourier Transform
This method computes the complex-to-complex discrete Fourier transform.
Ignoring the batch dimensions, it computes the following expression:
$$
X[\omega_1, \dots, \omega_d] =
\sum_{n_1=0}^{N_1-1} \dots \sum_{n_d=0}^{N_d-1} x[n_1, \dots, n_d]
e^{-j\ 2 \pi \sum_{i=0}^d \frac{\omega_i n_i}{N_i}},
$$
where \(d\) = signal_ndim
is number of dimensions for the
signal, and \(N_i\) is the size of signal dimension \(i\).
This method supports 1D, 2D and 3D complex-to-complex transforms, indicated
by signal_ndim
. input
must be a tensor with last dimension
of size 2, representing the real and imaginary components of complex
numbers, and should have at least signal_ndim + 1
dimensions with optionally
arbitrary number of leading batch dimensions. If normalized
is set to
TRUE
, this normalizes the result by dividing it with
\(\sqrt{\prod_{i=1}^K N_i}\) so that the operator is unitary.
Returns the real and the imaginary parts together as one tensor of the same
shape of input
.
The inverse of this function is torch_ifft
.