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

glorot初始化 #10

Open
Atomu2014 opened this issue Feb 15, 2018 · 5 comments
Open

glorot初始化 #10

Atomu2014 opened this issue Feb 15, 2018 · 5 comments

Comments

@Atomu2014
Copy link

我认为直接使用Xavier初始化网络参数会有一点问题,因为网络的真实输入输出并不是[2embed_size, 1],而是[n^2embed_size, n^2/2],从这个角度来看,为了保证输出与梯度的分布接近标准正态,应该采用3维的xavier [n^2/2, 2embed_size, 1]来进行初始化。当然,从网络的角度来说,输入输出还是[2embed_size, 1],因此glorot的方法可能并不完全适用,更加合理的初始化可能介于2embed_size, 1]与[n^2/2, 2embed_size, 1]之间,目前的初始化方法容易nan可能是因为方差过大导致的,这一点可以通过调节问题粗暴控制,但是如果在最开始的几个step就产生梯度爆炸的话,调节温度也救不回来

@hexiangnan
Copy link
Owner

hexiangnan commented Feb 15, 2018 via email

@Atomu2014
Copy link
Author

FM同样面临稀疏数据初始化的问题,据我所知另一种主流的FM初始化方法是采用方差为根号1/k的随机分布,k为embedding size,而且由于采用了adaptive optimizer,FM不能保证在不同的初始化条件下收敛到相同的解

@hexiangnan
Copy link
Owner

hexiangnan commented Feb 26, 2018 via email

@Atomu2014
Copy link
Author

SGD很慢,实验室环境中,数据量上亿之后很难做到上百轮的训练,用adaptive算法能显著加快收敛。
从比赛角度讲,比较出名的FFM就是用的adagrad算法,这可能也是libFFM的优秀训练速度的一个原因。
从工业界角度讲,end-to-end的策略也会比预训练更有优势,个人认为合理的初始化策略是值得探讨的一个问题。

@Atomu2014
Copy link
Author

感谢您耐心的回答

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

2 participants