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

dynamic_lstm和dynamic_gru的H0如何使用? #11335

Closed
gavin1332 opened this issue Jun 11, 2018 · 7 comments
Closed

dynamic_lstm和dynamic_gru的H0如何使用? #11335

gavin1332 opened this issue Jun 11, 2018 · 7 comments
Assignees
Labels
User 用于标记用户问题

Comments

@gavin1332
Copy link
Collaborator

dynamic_gru为什么要求h_0的shape为(hid_size, hid_size),不应该是(-1, hid_size)么?请参见代码
https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/layers/nn.py
681行左右:assert h_0.shape == (size, size), 'The shape of h0 should be(%d, %d)' % (size, size)

另外dynamic_lstm目前无法支持H0,有其他可代替的方法吗?

@Yancey1989 Yancey1989 added the User 用于标记用户问题 label Jun 11, 2018
@Yancey1989 Yancey1989 self-assigned this Jun 11, 2018
@Yancey1989
Copy link
Contributor

感谢反馈

dynamic_gru为什么要求h_0的shape为(hid_size, hid_size)

这里确实是Python接口写错了。。。需要fix下

另外dynamic_lstm目前无法支持H0,有其他可代替的方法吗?

dynamic_lstm 在C++代码中已经支持了的,需要在Python接口中expose下,暂时还没有其他方案。

@Yancey1989
Copy link
Contributor

I added two issues to fix the problems in this issue #11340, #11339

@gavin1332
Copy link
Collaborator Author

OK

@gavin1332
Copy link
Collaborator Author

dynamic_lstm 在C++代码中已经支持了的,需要在Python接口中expose下,暂时还没有其他方案。

这个有具体排期吗?因为没有可替换的方案,当前依赖H0任务无法开展

@gavin1332
Copy link
Collaborator Author

@Yancey1989

@Yancey1989
Copy link
Contributor

Hi @gavin1332 , 已提PR #11391 ,等merge了下载最新的wheel包就可以用了。

@Yancey1989
Copy link
Contributor

Hi @gavin1332 , 问题已fix,可以尝试编译最新的代码或者等明天在CI上下载最新的wheel包更新paddle。
先关闭这个issue了,如果仍然有问题可以随时打开它。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User 用于标记用户问题
Projects
None yet
Development

No branches or pull requests

2 participants