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

零基础入门深度学习(6) - 长短时记忆网络(LSTM) 误差项沿时间的反向传递 公式(13)有错误 #33

Open
cyrixlin opened this issue Oct 12, 2018 · 0 comments

Comments

@cyrixlin
Copy link

首先,非常感谢《零基础入门深度学习》作者hanbingtao付出的辛苦努力,提供了这么好的教程和代码程序。

误差项沿时间的反向传递 公式(13)明显写错了。
将误差项向前传递到任意k时刻的公式:

δ k T = ∏ j = k t − 1 δ o , j T W o h + δ f , j T W f h + δ i , j T W i h + δ c ~ , j T W c h ( 式 13 )




原公式是采用从j=k到j=t-1求delta(j),然后把各个delta(j)乘起来,得到delta(k)。这显然是错误的,应当采用循环处理,已知delta(t),用原文中公式(58)求出delta(t-1),反复使用公式(58)直至求出delta(k)。而不是连乘积的形式。

从原文给出的样例代码lstm.py也可以看出这一点,是采用循环处理,逐步沿时间前移,而不是连乘积的算法。

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