Skip to content

Commit b881f8c

Browse files
committed
Modify control_flow.py doc
1 parent 76bce84 commit b881f8c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/fluid/design/concepts/lod_tensor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Hence, we encapsulate this implementation detail in C++ and expose the original
198198
Specifically, user can use the following code to set or get the LoD info of a LoDTensor in Python:
199199
```Python
200200
# lod using length representation
201-
lod = [[3, 1, 2], [2, 2, 1, 3, 1, 2]]
201+
lod = [[1, 3, 2]]
202202
# Create a LoDTensor that has the above lod info.
203203
# This lod will be converted to an offset representation in the C++ implementation under the hood.
204204
tensor = fluid.LoDTensor(lod)

python/paddle/fluid/layers/control_flow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,8 @@ def lod_rank_table(x, level=0):
746746
.. code-block:: text
747747
748748
x is a LoDTensor:
749-
x.lod = [[0, 2, 3],
750-
[0, 5, 6, 7]]
749+
x.lod = [[2, 1],
750+
[5, 1, 1]]
751751
x.data = [a, b, c, d, e, f, g]
752752
753753
1. set level to 0:

0 commit comments

Comments
 (0)