
参考文献
https://zhuanlan.zhihu.com/p/57162373
源码解读
https://github.com/shenweichen/DeepCTR
可分为三大块:
1.模型输入部分
通过Input层和embedding层,对稀疏特征进行embed。得到一个embedding_list
2.模型结构部分
用tensorflow的build,call函数,新建Layer,一层一层堆积
3.模型训练和预测部分
继承tf.keras中的Layer类,里面有fit和predict方法。
1.模型输入部分



一些总结
不用做one hot,将sparse feature做embedding灌入模型中,指定embed size.
注意:
CIN层是向量级别的交叉,所以xdeepFM,不能做不同的embed size
CIN博客
http://xudongyang.coding.me/xdeepfm/
http://kubicode.me/2018/09/17/Deep%20Learning/eXtreme-Deep-Factorization-Machine/#CIN
高级特征计算过程:
应用了Kronecker product(克罗内克积),CNN中的核思想,RNN中的前后思想。
m为特征数,D为embed size长度。Hk为k层的特征数。


网友评论