Shortcuts

Function torch::fft::rfft2

Function Documentation

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

Computes the 2-dimensional FFT of real input.

Returns a onesided Hermitian output. See https://pytorch.org/docs/main/fft.html#torch.fft.rfft2

Example:

auto t = torch::randn({128, 128}, dtype=kDouble);
torch::fft::rfft2(t);

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