Skip to content

Commit

Permalink
Fix fluid.data code example in sz tool part 1. (PaddlePaddle#1478)
Browse files Browse the repository at this point in the history
test=develop
test=document_preview
  • Loading branch information
wawltor authored Oct 9, 2019
1 parent 3acf993 commit e92b8d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/fluid/api_cn/layers_cn/rank_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ rank
.. code-block:: python
import paddle.fluid as fluid
input = fluid.layers.data(
input = fluid.data(
name="input", shape=[3, 100, 100], dtype="float32")
rank = fluid.layers.rank(input) # rank=(3,)
rank = fluid.layers.rank(input) # rank=(4,)
2 changes: 1 addition & 1 deletion doc/fluid/api_cn/layers_cn/rsqrt_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ rsqrt
.. code-block:: python
import paddle.fluid as fluid
data = fluid.layers.data(name="input", shape=[32, 784])
data = fluid.data(name="input", shape=[32, 784])
result = fluid.layers.rsqrt(data)
2 changes: 1 addition & 1 deletion doc/fluid/api_cn/layers_cn/zeros_like_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ zeros_like
.. code-block:: python
import paddle.fluid as fluid
x = fluid.layers.data(name='x', dtype='float32', shape=[3], append_batch_size=False)
x = fluid.data(name='x', dtype='float32', shape=[3])
data = fluid.layers.zeros_like(x) # [0.0, 0.0, 0.0]

0 comments on commit e92b8d1

Please sign in to comment.