Skip to content

Commit ef8218b

Browse files
committed
update docs test=develop
1 parent 19b68de commit ef8218b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

paddle/fluid/operators/similarity_focus_op.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ Generate a similarity focus mask with the same shape of input using the followin
4242
2. For each index, find the largest numbers in the tensor T, so that the same
4343
row and same column has at most one number(what it means is that if the
4444
largest number has been found in the i-th row and the j-th column, then
45-
the numbers in the i-th or j-th column will be skipped. Obviously there
46-
will be min(B, C) numbers), and mark the corresponding position of the
45+
the numbers in the i-th row or j-th column will be skipped. And then the
46+
next largest number will be selected from the remaining numbers. Obviously
47+
there will be min(B, C) numbers), and mark the corresponding position of the
4748
3-D similarity focus mask as 1, otherwise as 0. Do elementwise-or for
4849
each index.
4950
3. Broadcast the 3-D similarity focus mask to the same shape of input X.

python/paddle/fluid/layers/nn.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7567,8 +7567,9 @@ def similarity_focus(input, axis, indexes, name=None):
75677567
2. For each index, find the largest numbers in the tensor T, so that the same
75687568
row and same column has at most one number(what it means is that if the
75697569
largest number has been found in the i-th row and the j-th column, then
7570-
the numbers in the i-th or j-th column will be skipped. Obviously there
7571-
will be min(B, C) numbers), and mark the corresponding position of the
7570+
the numbers in the i-th row or j-th column will be skipped. And then the
7571+
next largest number will be selected from the remaining numbers. Obviously
7572+
there will be min(B, C) numbers), and mark the corresponding position of the
75727573
3-D similarity focus mask as 1, otherwise as 0. Do elementwise-or for
75737574
each index.
75747575
3. Broadcast the 3-D similarity focus mask to the same shape of input X.

0 commit comments

Comments
 (0)