Skip to content

Commit 88376b8

Browse files
authored
fix api part4 (#6689)
1 parent 02d4e2b commit 88376b8

File tree

10 files changed

+15
-14
lines changed

10 files changed

+15
-14
lines changed

docs/api/paddle/nn/MSELoss_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MSELoss
44
-------------------------------
55

6-
.. py:function:: paddle.nn.MSELoss(reduction='mean')
6+
.. py:class:: paddle.nn.MSELoss(reduction='mean')
77
88
计算预测值和目标值的均方差误差。
99

docs/api/paddle/nn/MaxPool3D_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MaxPool3D
44
-------------------------------
55

6-
.. py:function:: paddle.nn.MaxPool3D(kernel_size, stride=None, padding=0, ceil_mode=False, return_mask=False, data_format="NCDHW", name=None)
6+
.. py:class:: paddle.nn.MaxPool3D(kernel_size, stride=None, padding=0, ceil_mode=False, return_mask=False, data_format="NCDHW", name=None)
77
构建 `MaxPool3D` 类的一个可调用对象,其将构建一个二维最大池化层,根据输入参数 `kernel_size`, `stride`,
88
`padding` 等参数对输入做最大池化操作。
99

docs/api/paddle/nn/PixelShuffle_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
PixelShuffle
44
-------------------------------
55

6-
.. py:function:: paddle.nn.PixelShuffle(upscale_factor, data_format="NCHW", name=None)
6+
.. py:class:: paddle.nn.PixelShuffle(upscale_factor, data_format="NCHW", name=None)
77
88
将一个形为 :math:`[N, C, H, W]` 或是 :math:`[N, H, W, C]` 的 Tensor 重新排列成形为 :math:`[N, C/r^2, H \times r, W \times r]` 或 :math:`[N, H \times r, W \times r, C/r^2]` 的 Tensor。这样做有利于实现步长(stride)为 :math:`1/r` 的高效 sub-pixel(亚像素)卷积。详见 Shi 等人在 2016 年发表的论文 `Real Time Single Image and Video Super Resolution Using an Efficient Sub Pixel Convolutional Neural Network <https://arxiv.org/abs/1609.05158v2>`_ 。
99

docs/api/paddle/nn/PixelUnshuffle_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
PixelUnshuffle
44
-------------------------------
55

6-
.. py:function:: paddle.nn.PixelUnshuffle(downscale_factor, data_format="NCHW", name=None)
6+
.. py:class:: paddle.nn.PixelUnshuffle(downscale_factor, data_format="NCHW", name=None)
77
将一个形为 :math:`[N, C, H, W]` 或是 :math:`[N, H, W, C]` 的 Tensor 重新排列成形为 :math:`[N, r^2C, H/r, W/r]` 或 :math:`[N, H/r, W/r, r^2C]` 的 Tensor,这里 :math:`r` 是减小空间分辨率的减小因子。这个算子是 PixelShuffle 算子(请参考::ref:`cn_api_paddle_nn_PixelShuffle`)的逆算子。详见施闻哲等人在 2016 年发表的论文 `Real Time Single Image and Video Super Resolution Using an Efficient Sub Pixel Convolutional Neural Network <https://arxiv.org/abs/1609.05158v2>`_ 。
88

99
.. code-block:: text

docs/api/paddle/nn/RNNCellBase_cn.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,21 @@ RNNCellBase
1111

1212
该 OP(RNNCellBase)是一个抽象表示根据输入和隐藏状态来计算输出和新状态的基本类,最适合也最常用于循环神经网络。
1313

14-
.. py:function:: get_initial_states(batch_ref,shape=None,dtype=None,init_value=0.,batch_dim_idx=0):
14+
方法
15+
::::::::::::
16+
get_initial_states(batch_ref,shape=None,dtype=None,init_value=0.,batch_dim_idx=0):
17+
'''''''''
1518

1619
根据输入的形状,数据类型和值生成初始状态。
1720

18-
参数
19-
::::::::::::
21+
**参数**
2022

2123
- **batch_ref** (Tensor) - 一个 Tensor,其形状决定了生成初始状态使用的 batch_size。当 batch_ref 形状为 d 时,d[batch_dim_idx]为 batch_size。
2224
- **shape** (list|tuple,可选) - 隐藏层的形状(可以是多层嵌套的),列表或元组的第一位为 batch_size,默认为-1。shape 为 None 时,使用 state_shape(property)。默认为 None。
2325
- **dtype** (str|list|tuple,可选) - 数据类型(可以是多层嵌套的,但嵌套结构要和 shape 相同。或者所有 Tensor 的数据类型相同时可以只输入一个 dtype。)。当 dtype 为 None 且 state_dtype(property)不可用时,则使用 paddle 默认的 float 类型。默认为 None。
2426
- **init_value** (float,可选) -用于初始状态的浮点数值。默认为 0。
2527
- **batch_dim_idx** (int,可选) - 用于指定 batch_size 在 batch_ref 的索引位置的整数值。默认为 0。
2628

27-
返回
28-
::::::::::::
29+
**返回**
2930

3031
- **init_state** (Tensor|tuple|list) - 根据输出的数据类型,形状和嵌套层级返回的初始状态 Tensor。

docs/api/paddle/nn/Unflatten_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Unflatten
44
-------------------------------
55

6-
.. py:function:: paddle.nn.Unflatten(axis, shape, name=None)
6+
.. py:class:: paddle.nn.Unflatten(axis, shape, name=None)
77
88
99

docs/api/paddle/nn/UpsamplingBilinear2D_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
UpsamplingBilinear2D
44
-------------------------------
55

6-
.. py:function:: paddle.nn.UpsamplingBilinear2D(size=None,scale_factor=None, data_format='NCHW',name=None)
6+
.. py:class:: paddle.nn.UpsamplingBilinear2D(size=None,scale_factor=None, data_format='NCHW',name=None)
77
88
99

docs/api/paddle/nn/UpsamplingNearest2D_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
UpsamplingNearest2D
44
-------------------------------
55

6-
.. py:function:: paddle.nn.UpsamplingNearest2D(size=None,scale_factor=None, data_format='NCHW',name=None)
6+
.. py:class:: paddle.nn.UpsamplingNearest2D(size=None,scale_factor=None, data_format='NCHW',name=None)
77
88
99

docs/api/paddle/optimizer/Optimizer_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Optimizer
44
-------------------------------
55

6-
.. py:class::class paddle.optimizer.Optimizer(learning_rate, parameters=None, weight_decay=None, grad_clip=None, name=None)
6+
.. py:class:: paddle.optimizer.Optimizer(learning_rate, parameters=None, weight_decay=None, grad_clip=None, name=None)
77
88
99

docs/api/paddle/regularizer/L1Decay_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
L1Decay
44
-------------------------------
55

6-
.. py:attribute:: paddle.regularizer.L1Decay(coeff=0.0)
6+
.. py:class:: paddle.regularizer.L1Decay(coeff=0.0)
77
88
L1Decay 实现 L1 权重衰减正则化,用于模型训练,使得权重矩阵稀疏。
99

0 commit comments

Comments
 (0)