-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[C++ API parity] Multi Label Margin loss #27659
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
Conversation
yf225
left a comment
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 a lot for the awesome work @CarMiranda! I think the comments on the other PRs also apply to this PR, but they are mostly minor :D
| } | ||
|
|
||
| Tensor MultiLabelMarginLossImpl::forward(const Tensor& input, const Tensor& target) { | ||
| return torch::multilabel_margin_loss(input, target, options.reduction()); |
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.
similarly here:
| return torch::multilabel_margin_loss(input, target, options.reduction()); | |
| return F::multilabel_margin_loss(input, target, options); |
yf225
left a comment
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.
@CarMiranda Thanks a lot for the awesome work! I will merge it after CI passes :D
facebook-github-bot
left a comment
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.
@yf225 is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
TODO: wait for #27422 to land first, and then use |
facebook-github-bot
left a comment
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.
@yf225 is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
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.
@yf225 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: In accordance with pytorch#25883, I added the `MultiLabelMarginLoss` module and `multilabel_margin_loss` functional. Pull Request resolved: pytorch#27659 Differential Revision: D17931905 Pulled By: yf225 fbshipit-source-id: 3642f75c79843dda55ac38de9f6f970f3e237847
In accordance with #25883, I added the
MultiLabelMarginLossmodule andmultilabel_margin_lossfunctional.