hexiangnan / neural_factorization_machine

TenforFlow Implementation of Neural Factorization Machine
467 stars 186 forks source link

when computed the output of Bi-Interaction Layer. #7

Open mambasmile opened 5 years ago

mambasmile commented 5 years ago

Model.

_____ sumsquare part ____

get the summed up embeddings of features.

nonzero_embeddings = tf.nn.embedding_lookup(self.weights['feature_embeddings'], self.train_features) self.summed_features_emb = tf.reduce_sum(nonzero_embeddings, 1) # None * K

get the element-multiplication

self.summed_features_emb_square = tf.square(self.summed_features_emb) # None * K

The above code is in the NerualFM.py

when you computed the self.summed_features_emb, the axis you wrote is '1', I think it should be 0. Did I understand wrong?