-
Notifications
You must be signed in to change notification settings - Fork 46
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
Feature: Add FastAP Loss #199
Conversation
✅ Deploy Preview for capable-unicorn-d5e336 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Could you please add a test for this loss as well? You can also run an experiment by using it one of the examples in the repository.
There are two minor issues in the implementation that I commented, otherwise it looks promising.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
Thanks for handling these reviews. LGTM, I'll merge it.
FastAP
loss. Primarily inspired by Pytorch-metric-learning implementation and official implementation. For more details, refer to the paper https://cs-people.bu.edu/fcakir/papers/fastap_cvpr2019.pdf.Circle Loss
to givedistance_metric_name
to the constructor of the superclass. (I'm not sure if it was not given on purpose or a small mistake - related PR)get_anchor_negative_mask
andget_anchor_positive_mask
to acceptlabels_b
asOptional[Tensor]
so that we can call those functions with only one parameter (as I did in FastAP Loss).test_fast_ap_loss.py
so that we can compare out loss with the "expected" loss value (Inspired by the test file written for pytorch-metric-learning.)This PR is now open for review. FYI @generall @monatis.
I'd be happy to hear any suggestions, corrections, or improvements.