Shortcuts

Function torch::fft::fftshift

Function Documentation

inline Tensor torch::fft::fftshift(const Tensor &x, at::OptionalIntArrayRef dim = c10::nullopt)

Reorders n-dimensional FFT output to have negative frequency terms first, by a torch.roll operation.

See https://pytorch.org/docs/main/fft.html#torch.fft.fftshift

Example:

auto x = torch::randn({127, 4});
auto centred_fft = torch::fft::fftshift(torch::fft::fftn(x));

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources