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

lstm前一个batch的最后时刻的hidden_state,作为下一个batch的初始hidden_state #2

Open
chenmozxh opened this issue May 29, 2019 · 0 comments

Comments

@chenmozxh
Copy link

读了一些代码,感觉lstm前一个batch的最后时刻的hidden_state,作为下一个batch的初始hidden_state?是这样吧?
为啥要这么设置呢?因为看读语料函数read_raw、create_batchs、create_one_batch中,每一个batch内部的语料是前后连续的,而batch之间是经过shuffle的,没有任何关系。
所以,把前一个batch的最后时刻的hidden_state作为下一个batch的hidden_state的原因是?

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

No branches or pull requests

1 participant