@@ -1914,19 +1914,23 @@ def sequence_slice(input, offset, length, name=None):
1914
1914
.. code-block:: text
1915
1915
1916
1916
- Case:
1917
- Given the input Variable **input**,
1918
- input.data = [[a1, a2], [b1, b2], [c1, c2], [d1, d2], [e1, e2]],
1919
- input.lod = [[0, 3, 5]], input.dims = (5, 2)
1920
1917
1921
- with offset.data = [[0], [1]], length.data = [[2], [1]],
1918
+ Given the input Variable **input**:
1919
+
1920
+ input.data = [[a1, a2], [b1, b2], [c1, c2], [d1, d2], [e1, e2]],
1921
+ input.lod = [[3, 2]],
1922
+ input.dims = (5, 2),
1922
1923
1923
- the output Variable will be
1924
+ with offset.data = [[0], [1]] and length.data = [[2], [1]],
1924
1925
1925
- out.data = [[a1, a2], [b1, b2], [e1, e2]],
1926
- out.lod = [[0, 2, 3]], out.dims = (3, 2)
1926
+ the output Variable will be
1927
+
1928
+ out.data = [[a1, a2], [b1, b2], [e1, e2]],
1929
+ out.lod = [[2, 1]],
1930
+ out.dims = (3, 2).
1927
1931
1928
- NOTE: The first dimension size of input, the size of offset and Length
1929
- should be equal. The offset start from 0.
1932
+ NOTE: The first dimension size of ** input**, ** offset** and **length**
1933
+ should be equal. The ** offset** should start from 0.
1930
1934
1931
1935
Args:
1932
1936
input(Variable): The input Variable which consists of the complete
0 commit comments