tensorflow-DeepFM
tensorflow-DeepFM copied to clipboard
In DeepFm.py line 102, why the second order term's size is (None, K) rather than (None, )?
From the equation (2) in the paper, the second order term should be a scalar. However, in the code, it is computed as a vector. I think the line 102 should be something like this:
self.y_second_order = 0.5 * tf.reduce_sum(tf.subtract(self.summed_features_emb_square, self.squared_sum_features_emb))
IMO, the original paper said each of three components should all be one scalar, then sum together to fed to sigmod() . But you can also treat the sum of scalar as sum(w1x1, w2x2...), and set w1=w2=..=1。In this git repo, the author treat all W as trainable variables, which is an extension to original paper. Although effect of this modification is unknown, this implementation is still following the core ideas of the paper.
我是健翔,您的邮件我收到了。