triplet_recommendations_keras
triplet_recommendations_keras copied to clipboard
Please,I have a problem with your function "bpr_triplet_loss"...
I saw you have use "K.sum(user_latent * positive_item_latent, axis=-1, keepdims=True)",but in my keras with tensorflow backend,this "*" means point-wise multiplication. I think we should compute the cos similarity between user and pos-items,so why Why don't we use "K.batch_dot(K.l2_normalize(x,axis = -1),K.l2_normalize(y,axis=-1))"? Thank you for your answer and help!
For BPR we want dot products, not cosine similarity (at least it's defined that way in the paper).
K.batch_dot
may still be useful, though.