-
Notifications
You must be signed in to change notification settings - Fork 492
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
FFM代码问题请教 #45
Comments
我也有这样的疑惑,我一开始以为是经优化过后的公式,但是好像推不出来,而且我测试了两种结果并不一致 |
这个代码我理解是不同特征相同领域向量相加,然后再进行不同领域之间交叉,和公式上的不太一样呢 |
我也是这里感觉不是很好理解,我看过其他代码实现:首先将每个feat映射到filed(但是这里作者应该是简化了,一个feat就当作是一个filed了),然后循环应该是按照feat走,而不是按照filed,实际取的时候需要注意到对方feat所在filed,然后对应取embedding。包括你写的和作者的循环都是以range(self.filed_num)走的,所以似乎都不太对。 |
在求教二阶交叉信息的时候,embedding_lookup之后应该是一个batch,filed_num,field_num,k的矩阵,
后面做交叉之前为什么要做这一步的reduce_sum
latent_vector = tf.reduce_sum(tf.nn.embedding_lookup(self.v, inputs), axis=1)
我理解的代码应该是这样的:
The text was updated successfully, but these errors were encountered: