From 69c96f03d75e9b8abfe5f39a197643db42900d55 Mon Sep 17 00:00:00 2001 From: shenliang03 Date: Wed, 8 Apr 2020 10:31:48 +0800 Subject: [PATCH] fix doc of cn_doc, test=develop test=document_preview --- doc/fluid/api_cn/layers_cn/gather_cn.rst | 4 ++-- doc/fluid/api_cn/layers_cn/gather_nd_cn.rst | 4 ++-- doc/fluid/api_cn/layers_cn/scatter_nd_add_cn.rst | 6 +++--- doc/fluid/api_cn/layers_cn/scatter_nd_cn.rst | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/fluid/api_cn/layers_cn/gather_cn.rst b/doc/fluid/api_cn/layers_cn/gather_cn.rst index 5418839fc..26a3bbd1a 100644 --- a/doc/fluid/api_cn/layers_cn/gather_cn.rst +++ b/doc/fluid/api_cn/layers_cn/gather_cn.rst @@ -39,8 +39,8 @@ gather .. code-block:: python import paddle.fluid as fluid - x = fluid.layers.data(name='x', shape=[-1, 5], dtype='float32') - index = fluid.layers.data(name='index', shape=[-1, 1], dtype='int32') + x = fluid.data(name='x', shape=[-1, 5], dtype='float32') + index = fluid.data(name='index', shape=[-1, 1], dtype='int32') output = fluid.layers.gather(x, index) diff --git a/doc/fluid/api_cn/layers_cn/gather_nd_cn.rst b/doc/fluid/api_cn/layers_cn/gather_nd_cn.rst index d43cbf3cf..5fe8469d1 100644 --- a/doc/fluid/api_cn/layers_cn/gather_nd_cn.rst +++ b/doc/fluid/api_cn/layers_cn/gather_nd_cn.rst @@ -63,8 +63,8 @@ gather_nd .. code-block:: python import paddle.fluid as fluid - x = fluid.layers.data(name='x', shape=[3, 4, 5], dtype='float32') - index = fluid.layers.data(name='index', shape=[2, 2], dtype='int32') + x = fluid.data(name='x', shape=[3, 4, 5], dtype='float32') + index = fluid.data(name='index', shape=[2, 2], dtype='int32') output = fluid.layers.gather_nd(x, index) diff --git a/doc/fluid/api_cn/layers_cn/scatter_nd_add_cn.rst b/doc/fluid/api_cn/layers_cn/scatter_nd_add_cn.rst index 3a703fb7a..7444382e0 100644 --- a/doc/fluid/api_cn/layers_cn/scatter_nd_add_cn.rst +++ b/doc/fluid/api_cn/layers_cn/scatter_nd_add_cn.rst @@ -54,9 +54,9 @@ scatter_nd_add .. code-block:: python import paddle.fluid as fluid - ref = fluid.layers.data(name='ref', shape=[3, 5, 9, 10], dtype='float32', append_batch_size=False) - index = fluid.layers.data(name='index', shape=[3, 2], dtype='int32', append_batch_size=False) - updates = fluid.layers.data(name='update', shape=[3, 9, 10], dtype='float32', append_batch_size=False) + ref = fluid.data(name='ref', shape=[3, 5, 9, 10], dtype='float32') + index = fluid.data(name='index', shape=[3, 2], dtype='int32') + updates = fluid.data(name='update', shape=[3, 9, 10], dtype='float32') output = fluid.layers.scatter_nd_add(ref, index, updates) diff --git a/doc/fluid/api_cn/layers_cn/scatter_nd_cn.rst b/doc/fluid/api_cn/layers_cn/scatter_nd_cn.rst index b0e660b03..c8a424cf3 100644 --- a/doc/fluid/api_cn/layers_cn/scatter_nd_cn.rst +++ b/doc/fluid/api_cn/layers_cn/scatter_nd_cn.rst @@ -22,8 +22,8 @@ scatter_nd .. code-block:: python import paddle.fluid as fluid - index = fluid.layers.data(name='index', shape=[3, 2], dtype='int64', append_batch_size=False) - updates = fluid.layers.data(name='update', shape=[3, 9, 10], dtype='float32', append_batch_size=False) + index = fluid.data(name='index', shape=[3, 2], dtype='int64') + updates = fluid.data(name='update', shape=[3, 9, 10], dtype='float32') shape = [3, 5, 9, 10] output = fluid.layers.scatter_nd(index, updates, shape) -- GitLab