diff --git a/doc/fluid/api_cn/layers_cn/deformable_roi_pooling_cn.rst b/doc/fluid/api_cn/layers_cn/deformable_roi_pooling_cn.rst index e1b19b7ac12a275fabafbef26b8a51dc68553617..bcccb58ca3fd10fd79903184f59362b936e63804 100644 --- a/doc/fluid/api_cn/layers_cn/deformable_roi_pooling_cn.rst +++ b/doc/fluid/api_cn/layers_cn/deformable_roi_pooling_cn.rst @@ -48,7 +48,7 @@ deformable_roi_pooling .. code-block:: python - #position_sensitive为False + #position_sensitive=False import paddle.fluid as fluid input = fluid.data(name="input", @@ -74,7 +74,7 @@ deformable_roi_pooling trans_std=0.1, position_sensitive=False) - #position_sensitive为True + #position_sensitive=True import paddle.fluid as fluid input = fluid.data(name="input", diff --git a/doc/fluid/api_cn/layers_cn/elementwise_add_cn.rst b/doc/fluid/api_cn/layers_cn/elementwise_add_cn.rst index 91b9cece85ab1490bc0ff45cb22ba26e6871f060..7414eae16ca524e5388de7a09c2e104aa0174570 100644 --- a/doc/fluid/api_cn/layers_cn/elementwise_add_cn.rst +++ b/doc/fluid/api_cn/layers_cn/elementwise_add_cn.rst @@ -107,7 +107,7 @@ elementwise_add "y": np.random.randint(1, 5, size=[5]).astype('float32') } x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32') - y = fluid.layers.data(name="y", shape=[3,4], dtype='float32') + y = fluid.layers.data(name="y", shape=[5], dtype='float32') # z = x + y z = fluid.layers.elementwise_add(x, y, axis=3) place = fluid.CPUPlace() diff --git a/doc/fluid/api_cn/layers_cn/elementwise_div_cn.rst b/doc/fluid/api_cn/layers_cn/elementwise_div_cn.rst index a5b7544d305db7bd611baee677d223fc9335006e..d4d12f36b20d39247345933090f2c8b2215b14df 100644 --- a/doc/fluid/api_cn/layers_cn/elementwise_div_cn.rst +++ b/doc/fluid/api_cn/layers_cn/elementwise_div_cn.rst @@ -107,7 +107,7 @@ elementwise_div "y": np.random.randint(1, 5, size=[5]).astype('float32') } x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32') - y = fluid.layers.data(name="y", shape=[3,4], dtype='float32') + y = fluid.layers.data(name="y", shape=[5], dtype='float32') z = fluid.layers.elementwise_div(x, y, axis=3) # z = x / y place = fluid.CPUPlace() diff --git a/doc/fluid/api_cn/layers_cn/elementwise_mul_cn.rst b/doc/fluid/api_cn/layers_cn/elementwise_mul_cn.rst index 1ba52febf6c11fc514315ef64caf0acad1550700..9966144b9cd21da0af34a0f64d7c813e7fdb24e1 100644 --- a/doc/fluid/api_cn/layers_cn/elementwise_mul_cn.rst +++ b/doc/fluid/api_cn/layers_cn/elementwise_mul_cn.rst @@ -107,7 +107,7 @@ elementwise_mul "y": np.random.randint(1, 5, size=[5]).astype('float32') } x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32') - y = fluid.layers.data(name="y", shape=[3,4], dtype='float32') + y = fluid.layers.data(name="y", shape=[5], dtype='float32') z = fluid.layers.elementwise_mul(x, y, axis=3) # z = x * y place = fluid.CPUPlace() diff --git a/doc/fluid/api_cn/layers_cn/elementwise_sub_cn.rst b/doc/fluid/api_cn/layers_cn/elementwise_sub_cn.rst index 7bd8ac5e0549d6357c834a60d5a8d5a4fff2ef34..c5886ad2e0fa696aad8ae192ec8a0925aa6f1e6b 100644 --- a/doc/fluid/api_cn/layers_cn/elementwise_sub_cn.rst +++ b/doc/fluid/api_cn/layers_cn/elementwise_sub_cn.rst @@ -107,7 +107,7 @@ elementwise_sub "y": np.random.randint(1, 5, size=[5]).astype('float32') } x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32') - y = fluid.layers.data(name="y", shape=[3,4], dtype='float32') + y = fluid.layers.data(name="y", shape=[5], dtype='float32') z = fluid.layers.elementwise_sub(x, y, axis=3) # z = x - y place = fluid.CPUPlace() diff --git a/doc/fluid/api_cn/layers_cn/scale_cn.rst b/doc/fluid/api_cn/layers_cn/scale_cn.rst index f9ddd81f88ab446c144559cfc6f92538f7d44d3c..6623f9e451b594e71b28235a54dbe858d98ff9c9 100644 --- a/doc/fluid/api_cn/layers_cn/scale_cn.rst +++ b/doc/fluid/api_cn/layers_cn/scale_cn.rst @@ -62,7 +62,7 @@ scale import numpy as np inputs = fluid.layers.data(name="x", shape=[2, 3], dtype='float32') - scale = fluid.layers.data(name="scale", shape=[1], dtype='float32' + scale = fluid.layers.data(name="scale", shape=[1], dtype='float32', append_batch_size=False) output = fluid.layers.scale(inputs, scale = scale, bias = 1.0) diff --git a/doc/fluid/api_cn/layers_cn/unique_cn.rst b/doc/fluid/api_cn/layers_cn/unique_cn.rst index 6dcf44005f5a55eda5f2f2b8f5377321a7a1807c..0877f8686aa1101fff05377404492f8d45aa493f 100644 --- a/doc/fluid/api_cn/layers_cn/unique_cn.rst +++ b/doc/fluid/api_cn/layers_cn/unique_cn.rst @@ -27,7 +27,7 @@ unique为 ``x`` 返回一个unique张量和一个指向该unique张量的索引 import numpy as np import paddle.fluid as fluid - x = fluid.assign(np.array([2, 3, 3, 1, 5, 3], dtype='int32')) + x = fluid.layers.assign(np.array([2, 3, 3, 1, 5, 3], dtype='int32')) out, index = fluid.layers.unique(x) # out is [2, 3, 1, 5]; index is [0, 1, 1, 2, 3, 1]