torch.fft.ifft
- torch.fft.ifft(input, n=None, dim=-1, norm=None, *, out=None) →
Computes the one dimensional inverse discrete Fourier transform of input.
input (Tensor) – the input tensor
n (int, optional) – Signal length. If given, the input will either be zero-padded or trimmed to this length before computing the IFFT.
dim (int, optional) – The dimension along which to take the one dimensional IFFT.
norm (str, optional) –
Normalization mode. For the backward transform
(ifft()), these correspond to:
"forward" - no normalization
"backward" - normalize by 1/n
"ortho" - normalize by 1/sqrt(n) (making the IFFT orthonormal)
Calling the forward transform () with the same
normalization mode will apply an overall normalization of between
the two transforms. This is required to make
the exact inverse.
out (Tensor, optional) – the output tensor.
>>> t = torch.tensor([ 6.+0.j, -2.+2.j, -2.+0.j, -2.-2.j])
>>> torch.fft.ifft(t
1/nDefault is "backward" (normalize by 1/n).