Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#223 from tink2123/add_index_for_lod
Browse files Browse the repository at this point in the history
add index for lod_tensor
  • Loading branch information
shanyi15 committed Oct 24, 2018
2 parents 830bd9e + d565c63 commit 92103d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions doc/fluid/user_guides/howto/prepare_data/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,14 @@ Fluid提供PyReader异步数据传入方式,数据传入与模型训练/预测
:maxdepth: 2

use_py_reader.rst


LoD-Tensor简介
#####################

LoD-Tensor是Fluid中特有的概念,它在Tensor基础上附加了序列信息,支持处理变长数据。具体请参考:

.. toctree::
:maxdepth:2

lod_tensor.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Fluid引入了一个索引数据结构(LoD)来将张量分割成序列。

模型参数只是一个普通的张量,在Fluid中它们被表示为一个0-level LoD-Tensor。


<a name="#LoDTensor的偏移表示"></a>
## LoDTensor的偏移表示

为了快速访问基本序列,Fluid提供了一种偏移表示的方法——保存序列的开始和结束元素,而不是保存长度。
Expand Down Expand Up @@ -178,6 +178,7 @@ place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe.run(fluid.default_startup_program())
```
<a name="#准备数据"></a>

**准备数据**

Expand Down

0 comments on commit 92103d6

Please sign in to comment.