From ef8218be222c9576bd0435f7e842ce5650317371 Mon Sep 17 00:00:00 2001 From: barrierye Date: Wed, 7 Nov 2018 14:11:10 +0800 Subject: [PATCH] update docs test=develop --- paddle/fluid/operators/similarity_focus_op.cc | 5 +++-- python/paddle/fluid/layers/nn.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/similarity_focus_op.cc b/paddle/fluid/operators/similarity_focus_op.cc index 768b6903b..9612f82b6 100644 --- a/paddle/fluid/operators/similarity_focus_op.cc +++ b/paddle/fluid/operators/similarity_focus_op.cc @@ -42,8 +42,9 @@ Generate a similarity focus mask with the same shape of input using the followin 2. For each index, find the largest numbers in the tensor T, so that the same row and same column has at most one number(what it means is that if the largest number has been found in the i-th row and the j-th column, then - the numbers in the i-th or j-th column will be skipped. Obviously there - will be min(B, C) numbers), and mark the corresponding position of the + the numbers in the i-th row or j-th column will be skipped. And then the + next largest number will be selected from the remaining numbers. Obviously + there will be min(B, C) numbers), and mark the corresponding position of the 3-D similarity focus mask as 1, otherwise as 0. Do elementwise-or for each index. 3. Broadcast the 3-D similarity focus mask to the same shape of input X. diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index be0e75161..e3737bf6f 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -7567,8 +7567,9 @@ def similarity_focus(input, axis, indexes, name=None): 2. For each index, find the largest numbers in the tensor T, so that the same row and same column has at most one number(what it means is that if the largest number has been found in the i-th row and the j-th column, then - the numbers in the i-th or j-th column will be skipped. Obviously there - will be min(B, C) numbers), and mark the corresponding position of the + the numbers in the i-th row or j-th column will be skipped. And then the + next largest number will be selected from the remaining numbers. Obviously + there will be min(B, C) numbers), and mark the corresponding position of the 3-D similarity focus mask as 1, otherwise as 0. Do elementwise-or for each index. 3. Broadcast the 3-D similarity focus mask to the same shape of input X. -- GitLab