提交 af4615c1 编写于 作者: G Genieliu 提交者: Cheerego

Fix create lod tensor API (#737)

* fix create_lod_tensor

* fix create_lod_tensor English version

* Update feeding_data_en.rst
上级 ce07ddb8
...@@ -86,7 +86,7 @@ PaddlePaddle Fluid支持使用 :code:`fluid.layers.data()` 配置数据层; ...@@ -86,7 +86,7 @@ PaddlePaddle Fluid支持使用 :code:`fluid.layers.data()` 配置数据层;
exe.run(feed={ exe.run(feed={
"sentence": create_lod_tensor( "sentence": create_lod_tensor(
data=numpy.array([1, 3, 4, 5, 3, 6, 8], dtype='int64').reshape(-1, 1), data=numpy.array([1, 3, 4, 5, 3, 6, 8], dtype='int64').reshape(-1, 1),
lod=[[4, 1, 2]], recursive_seq_lens=[[4, 1, 2]],
place=fluid.CPUPlace() place=fluid.CPUPlace()
) )
}) })
......
...@@ -83,7 +83,7 @@ For example: ...@@ -83,7 +83,7 @@ For example:
exe.run(feed={ exe.run(feed={
"sentence": create_lod_tensor( "sentence": create_lod_tensor(
data=numpy.array([1, 3, 4, 5, 3, 6, 8], dtype='int64').reshape(-1, 1), data=numpy.array([1, 3, 4, 5, 3, 6, 8], dtype='int64').reshape(-1, 1),
lod=[4, 1, 2], recursive_seq_lens=[[4, 1, 2]],
place=fluid.CPUPlace() place=fluid.CPUPlace()
) )
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册