torch.fft.ifft — PyTorch 2.7 documentation (original) (raw)

torch.fft.ifft(input, n=None, dim=-1, norm=None, *, out=None) → Tensor

Computes the one dimensional inverse discrete Fourier transform of input.

Note

Supports torch.half and torch.chalf on CUDA with GPU Architecture SM53 or greater. However it only supports powers of 2 signal length in every transformed dimension.

Parameters

Keyword Arguments

out (Tensor, optional) – the output tensor.

Example

t = torch.tensor([ 6.+0.j, -2.+2.j, -2.+0.j, -2.-2.j]) torch.fft.ifft(t) tensor([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])