Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please,I have a problem with your function "bpr_triplet_loss"... #13

Open
zhhengcs opened this issue Nov 20, 2017 · 1 comment
Open

Comments

@zhhengcs
Copy link

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!

@maciejkula
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants