Skip to content

Commit f7cf022

Browse files
committed
Fix
1 parent d5de88a commit f7cf022

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

python/paddle/nn/functional/input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def embedding(
178178
with embedding size.
179179
180180
Note:
181-
The id in :attr:`x` must satisfy :math:`0 =< id < weight.shape[0]` ,
181+
The id in :attr:`x` must satisfy :math:`0 <= id < weight.shape[0]` ,
182182
otherwise the program will throw an exception and exit.
183183
184184
.. code-block:: text

python/paddle/nn/layer/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ class Embedding(Layer):
16801680
last dimension of the input Tensor shape.
16811681
16821682
Note:
1683-
The id in :attr:`x` must satisfy :math:`0 =< id < num_embeddings` ,
1683+
The id in :attr:`x` must satisfy :math:`0 <= id < num_embeddings` ,
16841684
otherwise the program will throw an exception and exit.
16851685
16861686
.. code-block:: text

python/paddle/static/nn/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3493,7 +3493,7 @@ def embedding(
34933493
The shape of output Tensor is generated by appending an emb_size dimension to the
34943494
last dimension of the input Tensor shape.
34953495
3496-
**Note:** The id in :attr:`input` must satisfy :math:`0 =< id < size[0]` ,
3496+
**Note:** The id in :attr:`input` must satisfy :math:`0 <= id < size[0]` ,
34973497
otherwise the program will throw an exception and exit.
34983498
34993499
.. code-block:: text
@@ -3649,7 +3649,7 @@ def sparse_embedding(
36493649
The shape of output Tensor is generated by appending an emb_size dimension to the
36503650
last dimension of the input Tensor shape.
36513651
3652-
**Note:** The id in :attr:`input` must satisfy :math:`0 =< id < size[0]` , otherwise
3652+
**Note:** The id in :attr:`input` must satisfy :math:`0 <= id < size[0]` , otherwise
36533653
the program will throw an exception and exit.
36543654
36553655
.. code-block:: text

0 commit comments

Comments
 (0)