Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/paddle/nn/functional/npair_loss_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ npair_loss

.. py:function:: paddle.nn.functional.npair_loss(anchor, positive, labels, l2_reg=0.002)
参考阅读 `Improved Deep Metric Learning with Multi class N pair Loss Objective <http://www.nec-labs.com/uploads/images/Department-Images/MediaAnalytics/papers/nips16_npairmetriclearning.pdf>`_
参考阅读 `Improved Deep Metric Learning with Multi class N pair Loss Objective <http://papers.nips.cc/paper/6200-improved-deep-metric-learning-with-multi-class-n-pair-loss-objective.pdf>`_

NPair 损失需要成对的数据。NPair 损失分为两部分:第一部分是对嵌入向量进行 L2 正则化;第二部分是每一对数据的相似性矩阵的每一行和映射到 ont-hot 之后的标签的交叉熵损失的和。

Expand Down