Rate this Page

Function torch::fft::fft2#

Function Documentation#

inline Tensor torch::fft::fft2(const Tensor &self, OptionalIntArrayRef s = std::nullopt, IntArrayRef dim = {-2, -1}, std::optional<std::string_view> norm = std::nullopt)#

Computes the 2-dimensional fast Fourier transform over the given dimensions.

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

Example:

auto t = torch::randn({128, 128}, dtype=kComplexDouble);
torch::fft::fft2(t);