提交 23a9035b 编写于 作者: C ceci3

test=develop, update doc

上级 66ead07e
......@@ -10676,7 +10676,10 @@ def npair_loss(anchor, positive, labels, l2_reg=0.002):
Examples:
.. code-block:: python
npair_loss = fluid.layers.npair_loss(anchor, positive, labels, l2_reg)
anchor = fluid.layers.data(name='anchor', shape=[18,6], dtype='float32')
positive = fluid.layers.data(name='positive', shape=[18,6], dtype='float32')
label = fluid.layers.data(name='labels',shape=[18], dtype='float32')
npair_loss = fluid.layers.npair_loss(anchor, positive, labels, 0.002)
'''
Beta = 0.25
batch_size = labels.shape[0]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册