A simple DeepFM. See details at here.
- Keras 2.0.8
- TensorFlow 1.7
python DeepFM.py
DeepFM: A Factorization-Machine based Neural Network for CTR Prediction paper address
If you meet errors about Embedding Layer, try fix the compute_mask function.
def compute_mask(self, inputs, mask=None):
if not self.mask_zero:
return None
else:
# return K.not_equal(inputs, 0)
mask = K.repeat(K.not_equal(inputs, 0), self.output_dim)
mask = tf.transpose(mask, [0,2,1])
return mask