-
Notifications
You must be signed in to change notification settings - Fork 614
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
[losses] migrate npairs multilabel loss #466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, Tzu-wei!
By the way, can we provide a helper method which calculates similarity_matrix
? It might be user-friendly for tf 1.x users. What do you think?
@Squadrick Hi, Dheeraj. I think the PR looks good. Do you have time to double check it? Thanks :-) |
Seems good, but it will be a one line function like |
@WindQAQ Oh, you're right, forget it |
Maybe add a test to check that the new loss is compatible with the Keras Model API? It would be great if we add it under |
Like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to merge it at first, thank you, Tzu-Wei!
Closes #26. Finally the last one :-)
Migrate
npairs_loss_multilabel
from contribRename
npairs_loss_multilabel
tonpairs_multilabel_loss
, which makes sense to addons' naming styleModify input spec from
labels
(list of sparse tensor)embedding_anchor
embedding_posititve
to
y_true
(either tensor or sparse tensor)y_pred
(similarity matrix, which is the multiplication of anchor and positive)