Skip to content
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

API doc(cn) Bugs fix in 第四期体验评估 #4958

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
13 changes: 11 additions & 2 deletions docs/api/paddle/add_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,19 @@ add
- :math:`X`:多维Tensor。
- :math:`Y`:多维Tensor。

如下两种情况使用该算子:
第一种情况:
1. ``X`` 与 ``Y`` 的形状一样。
2. ``Y`` 的形状是 ``X`` 的一部分连续的形状。
第二种情况:
1. 广播 ``Y`` 使其形状与 ``X`` 相同,其中 ``axis`` 是把 ``Y`` 广播到 ``X`` 的索引起始数。
2. 如果 ``axis`` 是默认值-1,则 :math:`axis=rank(X)−rank(Y)`。
3. ``Y`` 的最后一维形状为1时,该维度将会被忽略,比如 shape(Y) = (2, 1) => (2)。

参数
:::::::::
- x (Tensor) - 输入的Tensor,数据类型为:float32、float64、int32、int64。
- y (Tensor) - 输入的Tensor,数据类型为:float32、float64、int32、int64。
- **x** (Tensor) - 输入的Tensor,数据类型为:float32、float64、int32、int64。
- **y** (Tensor) - 输入的Tensor,数据类型为:float32、float64、int32、int64。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
Expand Down
4 changes: 2 additions & 2 deletions docs/api/paddle/expand_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ expand

参数
:::::::::
- x (Tensor) - 输入的 Tensor,数据类型为:bool、float32、float64、int32或int64。
- shape (tuple|list|Tensor) - 给定输入 ``x`` 扩展后的形状,若 ``shape`` 为 list 或者 tuple,则其中的元素值应该为整数或者 1-D Tensor,若 ``shape`` 类型为 Tensor,则其应该为 1-D Tensor。
- **x** (Tensor) - 输入的 Tensor,数据类型为:bool、float32、float64、int32或int64。
- **shape** (tuple|list|Tensor) - 给定输入 ``x`` 扩展后的形状,若 ``shape`` 为 list 或者 tuple,则其中的元素值应该为整数或者 1-D Tensor,若 ``shape`` 类型为 Tensor,则其应该为 1-D Tensor。值为-1表示保持相应维度的形状不变
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。

返回
Expand Down
12 changes: 3 additions & 9 deletions docs/api/paddle/full_like_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ full_like
返回一个根据 ``x`` 、``fill_value`` 、 ``dtype`` 创建的 Tensor。


**代码示例**:

.. code-block:: python
代码示例
::::::::::::

import paddle

input = paddle.full(shape=[2, 3], fill_value=0.0, dtype='float32', name='input')
output = paddle.full_like(input, 2.0)
# [[2. 2. 2.]
# [2. 2. 2.]]

COPY-FROM: paddle.full_like
2 changes: 1 addition & 1 deletion docs/api/paddle/log10_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ log10



Log10激活函数(计算底为10的对数
Log10激活函数(逐元素计算底为10的对数

.. math::
\\Out=log_{10} x\\
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/numel_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ numel
.. py:function:: paddle.numel(x)


返回一个长度为1并且元素值为输入 ``x`` 元素个数的 Tensor。
在静态模式下,返回一个长度为1并且元素值为输入 ``x`` 元素个数的 Tensor;在命令模式下,返回一个标量数值
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该翻译为静态图模式动态图模式


参数
::::::::::::
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/ones_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ones
-------------------------------

.. py:function:: paddle.ones(shape, dtype=None)
.. py:function:: paddle.ones(shape, dtype=None, name=None)



Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/where_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Tensor,形状与 ``condition`` 相同,数据类型与 ``x`` 和 ``y`` 相同

代码示例
::::::::::::
COPY-FROM: paddle.where:where-example
COPY-FROM: paddle.where