-
Notifications
You must be signed in to change notification settings - Fork 905
[API Compatibility] iinfo/cummax/cummin/diagflat/ldexp/inner/positive/rad2deg/rot90/nanquantile/neg/erf Edit By AI Agent #7878
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,23 +3,35 @@ | |||||
| cummin | ||||||
| ------------------------------- | ||||||
|
|
||||||
| .. py:function:: paddle.cummin(x, axis=None, dtype='int64', name=None) | ||||||
| .. py:function:: paddle.cummin(x, axis=None, dtype='int64', name=None, *, out=None) | ||||||
|
|
||||||
| 沿给定 ``axis`` 计算 Tensor ``x`` 的累积最小值。 | ||||||
|
|
||||||
| 本 API 支持两种调用方式: | ||||||
|
|
||||||
| 1. **Paddle 风格**: ``paddle.cummin(x, axis=None, dtype='int64', name=None)`` | ||||||
| ``axis`` 参数可选,默认为 ``None``。 | ||||||
|
|
||||||
| 2. **PyTorch 风格**: ``paddle.cummin(input, dim, *, out=None)`` | ||||||
| ``dim`` 参数必选。参数名 ``input`` 是 ``x`` 的别名,``dim`` 是 ``axis`` 的别名。 | ||||||
|
|
||||||
| .. note:: | ||||||
| 结果的第一个元素和输入的第一个元素相同。 | ||||||
|
|
||||||
| 参数 | ||||||
| :::::::::: | ||||||
| - **x** (Tensor) - 需要进行累积最小值操作的 Tensor。 | ||||||
| - **axis** (int,可选) - 指明需要累积最小值的维度。-1 代表最后一维。默认:None,将输入展开为一维变量再进行累积最小值计算。 | ||||||
| - **x** (Tensor) - 需要进行累积最小值操作的 Tensor。别名 ``input``。 | ||||||
| - **axis** (int,可选) - 指明需要累积最小值的维度。-1 代表最后一维。默认:None,将输入展开为一维变量再进行累积最小值计算。别名 ``dim``。 | ||||||
| - **dtype** (str|paddle.dtype|np.dtype,可选) - 输出 Indices 的数据类型,可以是 int32、int64,默认值为 int64。 | ||||||
| - **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name` ,一般无需设置,默认值为 None。 | ||||||
|
|
||||||
| 关键字参数 | ||||||
| :::::::::: | ||||||
| - **out** (tuple[Tensor, Tensor],可选) - 输出 Tensor 元组,包含两个 Tensor (values, indices)。若不为 ``None``,计算结果将保存在该 Tensor 元组中,默认值为 ``None``。 | ||||||
|
|
||||||
| 返回 | ||||||
| :::::::::: | ||||||
| - ``out`` (Tensor):返回累积最小值操作的结果,累积最小值结果类型和输入 x 相同。 | ||||||
| - ``values`` (Tensor):返回累积最小值操作的结果,累积最小值结果类型和输入 x 相同。 | ||||||
|
||||||
| - ``values`` (Tensor):返回累积最小值操作的结果,累积最小值结果类型和输入 x 相同。 | |
| - ``values`` (Tensor):返回累积最小值操作的结果,累积最小值结果类型和输入 ``x`` 相同。 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,28 +3,25 @@ | |||||
| erf | ||||||
| ------------------------------- | ||||||
|
|
||||||
| .. py:function:: paddle.erf(x, name = None) | ||||||
| .. py:function:: paddle.erf(x, name=None) | ||||||
|
|
||||||
| 逐元素计算 Erf 激活函数。 | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| 逐元素计算 Erf 激活函数。更多细节请参考 `Error function <https://en.wikipedia.org/wiki/Error_function>`_ 。 | ||||||
|
|
||||||
| 更多细节请参考 `Error function <https://en.wikipedia.org/wiki/Error_function>`_。 | ||||||
|
|
||||||
| .. math:: | ||||||
| out = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{- \eta^{2}}d\eta | ||||||
|
|
||||||
| 参数 | ||||||
| :::::::::::: | ||||||
|
|
||||||
| - **x** (Tensor) - 输入的多维 Tensor,数据类型为 float16、float32 或 float64。 | ||||||
| - **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||||||
| - **x** (Tensor) - 输入 Tensor,数据类型为 float32、float64、uint8、int8、int16、int32、int64。别名: ``input``。 | ||||||
|
||||||
| - **x** (Tensor) - 输入 Tensor,数据类型为 float32、float64、uint8、int8、int16、int32、int64。别名: ``input``。 | |
| - **x** (Tensor) - 输入 Tensor,数据类型为 float32、float64、uint8、int8、int16、int32、int64。别名: ``input``。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
返回值描述里“输入 x”建议使用 RST inline literal(
x)与前文 “Tensorx” 保持一致,避免变量名在渲染后不够醒目。