From 23a9035b214d5d43954ff3fc9590e25266d177d3 Mon Sep 17 00:00:00 2001 From: ceci3 <592712189@qq.com> Date: Fri, 8 Mar 2019 03:37:15 +0000 Subject: [PATCH] test=develop, update doc --- python/paddle/fluid/layers/nn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 61f14395b91..85e0afb270f 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -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] -- GitLab