Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paddle的stft函数和pytorch的stft函数在参数一致的情况下输出相差很多是为什么呢? #47750

Closed
zxcd opened this issue Nov 8, 2022 · 3 comments
Assignees

Comments

@zxcd
Copy link
Contributor

zxcd commented Nov 8, 2022

bug描述 Describe the Bug

torch.stft(audio, N_FFT, HOP_LENGTH, window=window)
输出第一行前三个[-1.0551e-02+0.0000e+00j, 2.1227e-03+0.0000e+00j, 8.4413e-03+0.0000e+00j

paddle.signal.stft(audio, N_FFT, HOP_LENGTH, window=window)
输出第一行前三个[[(-0.01521775871515274+0j) , (0.0030614458955824375+0j) , (0.012174495495855808+0j)

此时参数:
N_FFT = 400
HOP_LENGTH = 160
window = torch.hann_window(N_FFT)
audio 使用en.wav

其他补充信息 Additional Supplementary Information

No response

@paddle-bot
Copy link

paddle-bot bot commented Nov 8, 2022

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@JZ-LIANG
Copy link
Contributor

JZ-LIANG commented Nov 9, 2022

看了一下paddle stft 的输入,参数含义是和pytorch 一致的

但paddle stft单测中只是和 np 对齐, 没有和和pytorch 对齐的单测

python/paddle/fluid/tests/unittests/test_stft_op.py

请检查输出结果和 np 结果是否对齐符合预期,是否满足需求。

如果明确需要精度和 pytorch 对齐,需要和 paddle PM 提需求。

Copy link

paddle-bot bot commented Nov 14, 2023

Since you haven't replied for more than a year, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
由于您超过一年未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants