Documentation: A possible mistake in the STFT formula #153531
Labels
module: docs
Related to our documentation, both in docs/ and docblocks
module: fft
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
📚 The doc issue
In the stft documentation, the formula is given as follows:
pytorch/torch/functional.py
Lines 598 to 601 in 1341794
The denominator in the exponent is n_fft. Is that a mistake? I would expect the window length here rather than the number of frequency samples. I cannot find the actual implementation by a quick lookaround, so I have not checked what is done by the code.
Apart from the above, a minor issue is that the '- 1' on top of the sum sign should be outside of the \text macro.
Suggest a potential alternative/fix
Change the denominator to win_length, and leave '-1' in math mode.
cc @svekars @sekyondaMeta @AlannaBurke @mruberry
The text was updated successfully, but these errors were encountered: