未验证 提交 613fa9eb 编写于 作者: X xiaoting 提交者: GitHub

fix dead link and wrong description (#1020)

上级 5d5b4ad4
...@@ -100,11 +100,13 @@ prob = ie() ...@@ -100,11 +100,13 @@ prob = ie()
`BlockDesc`中包含本地变量的定义 [vars](../../api_guides/low_level/program.html#variable),和一系列的operator`ops` `BlockDesc`中包含本地变量的定义 [vars](../../api_guides/low_level/program.html#variable),和一系列的operator`ops`
```cpp ```cpp
message BlockDesc { message BlockDesc {
required int32 parent = 1; required int32 idx = 1;
repeated VarDesc vars = 2; required int32 parent_idx = 2;
repeated OpDesc ops = 3; repeated VarDesc vars = 3;
repeated OpDesc ops = 4;
} }
``` ```
parent ID表示父块,因此block中的操作符可以引用本地定义的变量,也可以引用祖先块中定义的变量。 parent ID表示父块,因此block中的操作符可以引用本地定义的变量,也可以引用祖先块中定义的变量。
......
...@@ -101,10 +101,11 @@ The block and program information described by the user is saved in Fluid in [pr ...@@ -101,10 +101,11 @@ The block and program information described by the user is saved in Fluid in [pr
`BlockDesc` contains the definition of the local variables `vars`, and a series of operators `ops`: `BlockDesc` contains the definition of the local variables `vars`, and a series of operators `ops`:
```cpp ```cpp
message BlockDesc { message BlockDesc {
required int32 parent = 1; required int32 idx = 1;
repeated VarDesc vars = 2; required int32 parent_idx = 2;
repeated OpDesc ops = 3; repeated VarDesc vars = 3;
repeated OpDesc ops = 4;
} }
``` ```
The parent ID represents the parent block, so the operators in the block can not only reference local variables, but also reference variables defined in the ancestor block. The parent ID represents the parent block, so the operators in the block can not only reference local variables, but also reference variables defined in the ancestor block.
......
...@@ -255,7 +255,7 @@ recursive_seq_lens 是一个双层嵌套列表,也就是列表的列表,最 ...@@ -255,7 +255,7 @@ recursive_seq_lens 是一个双层嵌套列表,也就是列表的列表,最
**定义计算过程** **定义计算过程**
layers.sequence_expand通过获取 y 的 lod 值对 x 的数据进行扩充,关于 :code:`fluid.layers.sequence_expand` 的功能说明,请先阅读 :ref:`api_fluid_layers_sequence_expand` 。 layers.sequence_expand通过获取 y 的 lod 值对 x 的数据进行扩充,关于 :code:`fluid.layers.sequence_expand` 的功能说明,请先阅读 :ref:`cn_api_fluid_layers_sequence_expand` 。
序列扩充代码实现: 序列扩充代码实现:
...@@ -279,7 +279,7 @@ layers.sequence_expand通过获取 y 的 lod 值对 x 的数据进行扩充, ...@@ -279,7 +279,7 @@ layers.sequence_expand通过获取 y 的 lod 值对 x 的数据进行扩充,
这里我们调用 :code:`fluid.create_lod_tensor` 创建 :code:`sequence_expand` 的输入数据,通过定义 y_d 的 LoD 值,对 x_d 进行扩充。其中,输出值只与 y_d 的 LoD 值有关,y_d 的 data 值在这里并不参与计算,维度上与LoD[-1]一致即可。 这里我们调用 :code:`fluid.create_lod_tensor` 创建 :code:`sequence_expand` 的输入数据,通过定义 y_d 的 LoD 值,对 x_d 进行扩充。其中,输出值只与 y_d 的 LoD 值有关,y_d 的 data 值在这里并不参与计算,维度上与LoD[-1]一致即可。
:code:`fluid.create_lod_tensor()` 的使用说明请参考 :ref:`api_fluid_create_lod_tensor` 。 :code:`fluid.create_lod_tensor()` 的使用说明请参考 :ref:`cn_api_fluid_create_lod_tensor` 。
实现代码如下: 实现代码如下:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册