Skip to content

修复 paddle\nn\layer\norm 等 API 的文档 #57112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/paddle/nn/layer/norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,9 @@ class BatchNorm2D(_BatchNormBase):
moving\_mean = moving\_mean * momentum + \mu_{\beta} * (1. - momentum) \quad &// global \ mean \\
moving\_variance = moving\_variance * momentum + \sigma_{\beta}^{2} * (1. - momentum) \quad &// global \ variance \\

- :math:`x` : mini-batch data
- :math:`m` : the size of the mini-batch data

The normalization function formula is as follows:

.. math::
Expand Down
4 changes: 2 additions & 2 deletions python/paddle/nn/layer/pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ class MaxPool2D(Layer):
5. A list or tuple of pairs of integers. It has the form [[pad_before, pad_after], [pad_before, pad_after], ...]. Note that, the batch dimension and channel dimension should be [0,0] or (0,0).
The default value is 0.
ceil_mode(bool, optional): when True, will use `ceil` instead of `floor` to compute the output shape
return_mask(bool, optional): Whether to return the max indices along with the outputs.
data_format(str, optional): The data format of the input and output data. An optional string from: `"NCHW"`, `"NDHW"`.
return_mask(bool, optional): Whether to return the max indices along with the outputs. Default is false.
data_format(str, optional): The data format of the input and output data. An optional string from: `"NCHW"`, `"NHWC"`.
The default is `"NCHW"`. When it is `"NCHW"`, the data is stored in the order of:
`[batch_size, input_channels, input_height, input_width]`.
name(str, optional): For detailed information, please refer to :ref:`api_guide_Name`.
Expand Down
6 changes: 3 additions & 3 deletions python/paddle/optimizer/momentum.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class Momentum(Optimizer):
Otherwise, the regularization setting here in optimizer will take effect. \
Default None, meaning there is no regularization.
grad_clip (GradientClipBase, optional): Gradient clipping strategy, it's an instance of
some derived class of ``GradientClipBase`` . There are three clipping strategies
( :ref:`api_base_clip_GradientClipByGlobalNorm` , :ref:`api_base_clip_GradientClipByNorm` ,
:ref:`api_base_clip_GradientClipByValue` ). Default None, meaning there is no gradient clipping.
some derived class of ``GradientClipBase`` . There are three clipping strategies:
some derived class of ``GradientClipBase`` . There are three clipping strategies:
:ref:`paddle.nn.ClipGradByGlobalNorm <cn_api_fluid_clip_ClipGradByGlobalNorm>` , :ref:`paddle.nn.ClipGradByNorm <cn_api_fluid_clip_ClipGradByNorm>` , :ref:`paddle.nn.ClipGradByValue <cn_api_fluid_clip_ClipGradByValue>`.
multi_precision (bool, optional): Whether to use multi-precision during weight updating. Default is false.
rescale_grad (float, optional): Multiply the gradient with `rescale_grad` before updating. \
Often choose to be ``1.0/batch_size``.
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/tensor/manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ def concat(x, axis=0, name=None):
# out1
# [[ 1 2 3 11 12 13 21 22]
# [ 4 5 6 14 15 16 23 24]]
# out2 out3
# out2 and out3
# [[ 1 2 3]
# [ 4 5 6]
# [11 12 13]
Expand Down