pytorch
0744dd61 - Fix shapes in the MarginRankingLoss docs (#43131)

Commit
4 years ago
Fix shapes in the MarginRankingLoss docs (#43131) Summary: Fixes https://github.com/pytorch/pytorch/issues/42884 I did some additional research and considering the first few lines of the docs (`Creates a criterion that measures the loss given inputs x1, x2, two 1D mini-batch Tensors, and a label 1D mini-batch tensor y (containing 1 or -1`) and the provided tests, this loss should be used primarily with 1-D tensors. More advanced users (that may use this loss in non-standard ways) can easily check the source and see that the definition accepts inputs/targets of arbitrary dimension as long as they match in shape or are broadcastable. Pull Request resolved: https://github.com/pytorch/pytorch/pull/43131 Reviewed By: colesbury Differential Revision: D23192011 Pulled By: mrshenli fbshipit-source-id: c412c28daf9845c0142ea33b35d4287e5b65fbb9
Author
Parents
Loading