Shortcuts

Function torch::fft::hfft

Function Documentation

inline Tensor torch::fft::hfft(const Tensor &self, std::optional<SymInt> n = std::nullopt, int64_t dim = -1, std::optional<c10::string_view> norm = std::nullopt)

Computes the 1 dimensional FFT of a onesided Hermitian signal.

The input represents a Hermitian symmetric time domain signal. The returned Fourier domain representation of such a signal is a real-valued. See https://pytorch.org/docs/main/fft.html#torch.fft.hfft

Example:

auto t = torch::randn(128 / 2 + 1, torch::kComplexDouble);
auto T = torch::fft::hfft(t, /*n=*&zwj;/128);
assert(T.is_floating_point() && T.numel() == 128);

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