Skip to content

Commit

Permalink
fix doc typo and format (PaddlePaddle#57018)
Browse files Browse the repository at this point in the history
* fix doc typo

* fix doc typo and missing part
  • Loading branch information
silverling authored and BeingGod committed Sep 9, 2023
1 parent a958fd1 commit 3073e68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/paddle/nn/layer/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class ParameterList(Layer):
This container acts like a Python list, but parameters it contains will be properly added.
Parameters:
parameters (iterable, optional): Iterable Parameters to be added
parameters (iterable, optional): Iterable Parameters to be added.
Examples:
.. code-block:: python
Expand Down
7 changes: 5 additions & 2 deletions python/paddle/nn/layer/norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,8 @@ class BatchNorm(Layer):
- :math:`x` : mini-batch data
- :math:`m` : the size of the mini-batch data
When use_global_stats = True, the :math:`\\mu_{\\beta}`
and :math:`\\sigma_{\\beta}^{2}` are not the statistics of one mini-batch.
When use_global_stats = True, the :math:`\mu_{\beta}`
and :math:`\sigma_{\beta}^{2}` are not the statistics of one mini-batch.
They are global or running statistics (moving_mean and moving_variance). It usually got from the
pre-trained model. Calculated as follows:
Expand Down Expand Up @@ -1181,6 +1181,9 @@ class BatchNorm1D(_BatchNormBase):
\sigma_{\beta}^{2} &\gets \frac{1}{m} \sum_{i=1}^{m}(x_i - \
\mu_{\beta})^2 \qquad &//\ mini-batch\ variance \\
- :math:`x` : mini-batch data
- :math:`m` : the size of the mini-batch data
When use_global_stats = True, the :math:`\mu_{\beta}`
and :math:`\sigma_{\beta}^{2}` are not the statistics of one mini-batch.
They are global or running statistics (moving_mean and moving_variance). It usually got from the
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/tensor/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ def zeros(shape, dtype=None, name=None):
If ``shape`` is a list or tuple, each element of it should be integer or 0-D Tensor with shape [].
If ``shape`` is an Tensor, it should be an 1-D Tensor which represents a list.
dtype(np.dtype|str, optional): Data type of output Tensor, it supports
bool, float16, float32, float64, int32 and int64. Default: if None, the date type is float32.
bool, float16, float32, float64, int32 and int64. Default: if None, the data type is float32.
name(str, optional): The default value is None. Normally there is no need for user to set this
property. For more information, please refer to :ref:`api_guide_Name`.
Expand Down

0 comments on commit 3073e68

Please sign in to comment.