-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
istft算子动转静,输入不定长报错 #41748
Comments
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~ 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 API,FAQ,Github Issue and AI community to get the answer.Have a nice day! |
麻烦您提供下最小可复现的代码 |
repeat_times,应该是这个参数是小于0的,看看能否变成一个tensor |
import paddle
from paddle.nn import Layer
from paddle.jit import to_static
from paddle.static import InputSpec
from paddle import signal
class SimpleNet(Layer):
def __init__(self, ):
super(SimpleNet, self).__init__()
def forward(self, real_part, img_part):
x = paddle.complex(real_part, img_part, name=None)
out = signal.istft(x, win_length=12, n_fft=20, hop_length=3, onesided=True, center=True)
return out
net = SimpleNet()
real_part = paddle.randn(shape=[1, 11, 1000])
img_part = paddle.randn(shape=[1, 11, 1000])
# 动态推理
print(net(real_part, img_part))
# 静态推理
net = to_static(net, input_spec=[InputSpec(shape=[1, 11, -1], name='real_part'), InputSpec(shape=[1, 11, -1], name='img_part')])
net(real_part, img_part) 报错信息:
|
怎么解决的 |
@LielinJiang @jerryuhoo 打扰两位,想问下问题解决了吗?可否介绍下解决方案?谢谢 |
Since you haven't replied for more than a year, we have closed this issue/pr. |
请提出你的问题 Please ask your question
用了InputSpec,由于输入是不定长的所以输入的shape是-1,请问如何解决呢?之前看到#40113 加入了stft和istft的支持。@KPatr1ck
The text was updated successfully, but these errors were encountered: