• Stars
    star
    101
  • Rank 336,165 (Top 7 %)
  • Language
    Python
  • Created over 6 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple DeepFM.

DeepFM in Keras

Introduction

A simple DeepFM. See details at here.

Environments

  • Keras 2.0.8
  • TensorFlow 1.7

Usage

    python DeepFM.py

Reference

DeepFM: A Factorization-Machine based Neural Network for CTR Prediction paper address

Notes

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