提交 6a627ce7 编写于 作者: Y Yibing Liu

Use length-based lod in seq_slice's doc

test=develop
上级 18e1c1e0
...@@ -1914,19 +1914,23 @@ def sequence_slice(input, offset, length, name=None): ...@@ -1914,19 +1914,23 @@ def sequence_slice(input, offset, length, name=None):
.. code-block:: text .. code-block:: text
- Case: - Case:
Given the input Variable **input**,
input.data = [[a1, a2], [b1, b2], [c1, c2], [d1, d2], [e1, e2]],
input.lod = [[0, 3, 5]], input.dims = (5, 2)
with offset.data = [[0], [1]], length.data = [[2], [1]], Given the input Variable **input**:
input.data = [[a1, a2], [b1, b2], [c1, c2], [d1, d2], [e1, e2]],
input.lod = [[3, 2]],
input.dims = (5, 2),
the output Variable will be with offset.data = [[0], [1]] and length.data = [[2], [1]],
out.data = [[a1, a2], [b1, b2], [e1, e2]], the output Variable will be
out.lod = [[0, 2, 3]], out.dims = (3, 2)
out.data = [[a1, a2], [b1, b2], [e1, e2]],
out.lod = [[2, 1]],
out.dims = (3, 2).
NOTE: The first dimension size of input, the size of offset and Length NOTE: The first dimension size of **input**, **offset** and **length**
should be equal. The offset start from 0. should be equal. The **offset** should start from 0.
Args: Args:
input(Variable): The input Variable which consists of the complete input(Variable): The input Variable which consists of the complete
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册