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

关于LSTMModel.py的问题 #6

Closed
hungryquiter opened this issue Dec 23, 2016 · 3 comments
Closed

关于LSTMModel.py的问题 #6

hungryquiter opened this issue Dec 23, 2016 · 3 comments

Comments

@hungryquiter
Copy link

params = []
for layer in layers:
params += layer.params
L2_rate = numpy.float32(1e-5)
for param in params[5:]:
cost += T.sum(L2_rate * (param * param), acc_dtype='float32')
gparams = [T.grad(cost, param) for param in params]

打印出的params如下:[E, U, P, Wi1, Wi2, bi, Wo1, Wo2, bo, Wf1, Wf2, bf, Wc1, Wc2, bc, W, v, Wu, Wp, b, Wi1, Wi2, bi, Wo1, Wo2, bo, Wf1, Wf2, bf, Wc1, Wc2, bc, W, v, Wu, Wp, b, W, b, W, b]
想问下,这个为什么从第五个开始,第五个应该是bi。
我的理解这个cost应该是正则化项,为何要从第五个开始,
另外,我想问一下,这里面的E,U,P的值是不是也在随着训练更新。谢谢了。

@huimchen
Copy link
Member

感谢你的提问!
这里应该是当时的整理错误,应该是3;
EUP也是同时更新的~

@hungryquiter
Copy link
Author

谢谢

@yinminggang
Copy link

但是现在下载的github上是param[1:],这是正确的吗?还是说param内容有变化?感谢。

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

3 participants