Skip to content

Conversation

@CarMiranda
Copy link
Contributor

In accordance with #25883, I added the MultiLabelMarginLoss module and multilabel_margin_loss functional.

Copy link
Contributor

@yf225 yf225 left a 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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly here:

Suggested change
return torch::multilabel_margin_loss(input, target, options.reduction());
return F::multilabel_margin_loss(input, target, options);

Copy link
Contributor

@yf225 yf225 left a 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

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@yf225
Copy link
Contributor

yf225 commented Oct 15, 2019

TODO: wait for #27422 to land first, and then use at::Reduction in this PR.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@facebook-github-bot
Copy link
Contributor

@yf225 merged this pull request in 7d277b0.

thiagocrepaldi pushed a commit to thiagocrepaldi/pytorch that referenced this pull request Feb 4, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: cpp Related to C++ API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants