diff --git a/doc/fluid/api_cn/layers_cn/pad2d_cn.rst b/doc/fluid/api_cn/layers_cn/pad2d_cn.rst index 9febca74dbc163af275d6b118970fbddfc79ca2b..364d3a11bf9fd6fa360831588d62fc14f141fe3d 100644 --- a/doc/fluid/api_cn/layers_cn/pad2d_cn.rst +++ b/doc/fluid/api_cn/layers_cn/pad2d_cn.rst @@ -55,5 +55,5 @@ pad2d .. code-block:: python import paddle.fluid as fluid - data = fluid.data(name='data', shape=[1, 1, 2, 3], dtype='float32') + data = fluid.data(name='data', shape=[None, 3, 32, 32], dtype='float32') result = fluid.layers.pad2d(input=data, paddings=[0, 1, 2, 3], mode='reflect') diff --git a/doc/fluid/api_cn/layers_cn/pad_cn.rst b/doc/fluid/api_cn/layers_cn/pad_cn.rst index f81fe33cd42fade797849e59042c445e948ac4cd..38acffa6479cc27ac082d616f75e867d7c81bb8d 100644 --- a/doc/fluid/api_cn/layers_cn/pad_cn.rst +++ b/doc/fluid/api_cn/layers_cn/pad_cn.rst @@ -42,7 +42,7 @@ pad # x 为一个秩为2的张量 import paddle.fluid as fluid - x = fluid.data(name='data', shape=[2, 2], dtype='float32') + x = fluid.data(name='data', shape=[300, 300], dtype='float32') out = fluid.layers.pad(x=x, paddings=[0, 1, 1, 2], pad_value=0.)