d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
23.24k stars 4.27k forks source link

Neural Collaborative Filtering for Personalized Ranking Prediction Layer missing? #1399

Closed LeeJZh closed 4 years ago

LeeJZh commented 4 years ago

To fuse the results of GMF and MLP, instead of simple addition, NeuMF concatenates the second last layers of two subnetworks to create a feature vector which can be passed to the further layers. Afterwards, the ouputs are projected with matrix h and a sigmoid activation function.

However the code is

con_res = np.concatenate([gmf, mlp], axis=1) return np.sum(con_res, axis=-1)

Should not np.sum be replaced with a dense layer?

astonzhang commented 4 years ago

@cheungdaven

cheungdaven commented 4 years ago

@LeeJZh You're right, we can add a dense layer over it. They will show similar performances. @astonzhang I think we can merge this request.

astonzhang commented 4 years ago

Thanks. It's merged.