pytorch
3f119a5f - Port of multilabel_margin_loss from TH to ATen (CPU) [2nd try] (#28504)

Commit
5 years ago
Port of multilabel_margin_loss from TH to ATen (CPU) [2nd try] (#28504) Summary: This is a port of the CPU version of the TH MultiLabelMarginCriterion to ATen. This reverts the revert of previous PR https://github.com/pytorch/pytorch/issues/28205 which caused a Windows Build to fail, please see comments in the original PR. I refactored the code so that the lambda-bodies of forward & backward of the AT_DISPATCH macro were extracted into separate functions. Similar code can be found at several cases in the ATen code base. Since I was not yet able to successfully compile PyTorch on Windows (due to other compile error) it would be great if somebody could launch a Windows test build for this PR to see if it now can be compiled successfully. Thanks in advance! Pull Request resolved: https://github.com/pytorch/pytorch/pull/28504 Differential Revision: D18115598 Pulled By: ezyang fbshipit-source-id: b62b6367966e0f6786794213b94eb0820092e572
Author
Parents
Loading