!45395 add marginrankingloss docs
Merge pull request !45395 from 冯一航/code_docs_add_margin_doc
This commit is contained in:
commit
a6fdae96e4
|
@ -3,4 +3,6 @@ mindspore.ops.margin_ranking_loss
|
|||
|
||||
.. py:function:: mindspore.ops.margin_ranking_loss(input1, input2, target, margin=0.0, reduction='mean')
|
||||
|
||||
排序损失函数,用于创建一个衡量给定损失的标准。
|
||||
|
||||
详情请参考 :class:`mindspore.nn.MarginRankingLoss`。
|
||||
|
|
|
@ -3014,6 +3014,8 @@ def _get_loss(x, reduction, cls_name, weights=1.0):
|
|||
|
||||
def margin_ranking_loss(input1, input2, target, margin=0.0, reduction='mean'):
|
||||
"""
|
||||
MarginRankingLoss creates a criterion that measures the loss.
|
||||
|
||||
For details, please refer to :class:`mindspore.nn.MarginRankingLoss`.
|
||||
"""
|
||||
margin = _check_value_type("margin", margin, [float], "margin_ranking_loss")
|
||||
|
|
Loading…
Reference in New Issue