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

docs: added i0 and i0e docs for paddle #5838

Merged
merged 3 commits into from
May 15, 2023
Merged
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
2 changes: 2 additions & 0 deletions docs/api/paddle/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ tensor 数学操作
" :ref:`paddle.frexp <cn_api_paddle_frexp>` ", "用于把一个浮点数分解为尾数和指数的函数"
" :ref:`paddle.trapezoid <cn_api_paddle_tensor_trapezoid>` ", "在指定维度上对输入实现 trapezoid rule 算法。使用累积求和函数 sum"
" :ref:`paddle.cumulative_trapezoid <cn_api_paddle_tensor_cumulative_trapezoid>` ", "在指定维度上对输入实现 trapezoid rule 算法。使用累积求和函数 cumsum"
" :ref:`paddle.i0 <cn_api_paddle_tensor_i0>` ", "对输入 Tensor 每个元素计算第一类零阶修正贝塞尔函数"
" :ref:`paddle.i0e <cn_api_paddle_tensor_i0e>` ", "对输入 Tensor 每个元素计算第一类指数缩放的零阶修正贝塞尔函数"
.. _tensor_math_inplace:

tensor 数学操作原位(inplace)版本
Expand Down
20 changes: 20 additions & 0 deletions docs/api/paddle/Tensor_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2544,3 +2544,23 @@ unflatten(axis, shape, name=None)
返回类型:Tensor

请参考 :ref:`cn_api_paddle_tensor_unflatten`

i0(x, name=None)
:::::::::
用于将输入的 Tensor 计算第一类零阶修正贝塞尔函数。

返回:一个第一类零阶修正贝塞尔函数上的 Tensor。
PommesPeter marked this conversation as resolved.
Show resolved Hide resolved

返回类型:Tensor

请参考 :ref:`cn_api_paddle_tensor_i0`

i0e(x, name=None)
:::::::::
用于将输入的 Tensor 计算第一类指数缩放的零阶修正贝塞尔函数。

返回:一个第一类指数缩放的零阶修正贝塞尔函数上的 Tensor。
PommesPeter marked this conversation as resolved.
Show resolved Hide resolved

返回类型:Tensor

请参考 :ref:`cn_api_paddle_tensor_i0e`
26 changes: 26 additions & 0 deletions docs/api/paddle/i0_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _cn_api_paddle_tensor_i0:

i0
-------------------------------

.. py:function:: paddle.i0(x, name=None)


对于给定 ``x`` 计算其每个元素的第一类零阶修正贝塞尔曲线函数,其中输入 ``x`` 大小无特殊限制。返回一个第一类零阶修正贝塞尔曲线函数上的 Tensor。

.. math::
I_0(x)=\sum^{\infty}_{k=0}\frac{(x^2/4)^k}{(k!)^2}

参数
::::::::::
- **x** (Tensor) – 输入是一个多维的 Tensor,它的数据类型可以是 float32,float64。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name` ,一般无需设置,默认值为 None。
返回
::::::::::
- ``Tensor`` (Tensor):在 x 处的第一类零阶修正贝塞尔曲线函数的值。


代码示例
::::::::::

COPY-FROM: paddle.i0
27 changes: 27 additions & 0 deletions docs/api/paddle/i0e_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _cn_api_paddle_tensor_i0e:

i0e
-------------------------------

.. py:function:: paddle.i0e(x, name=None)


对于给定 ``x`` 计算其每个元素的第一类指数缩放零阶修正贝塞尔曲线函数,其中输入 ``x`` 大小无特殊限制。返回一个第一类指数缩放零阶修正贝塞尔曲线函数上的 Tensor。

.. math::
I_0(x)=\sum^{\infty}_{k=0}\frac{(x^2/4)^k}{(k!)^2} \\
I_{0e}(x)=e^{-\lvert x\rvert}I_0(x)

参数
::::::::::
- **x** (Tensor) – 输入是一个多维的 Tensor,它的数据类型可以是 float32,float64。
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name` ,一般无需设置,默认值为 None。
返回
::::::::::
- ``Tensor`` (Tensor):在 x 处的第一类指数缩放零阶修正贝塞尔曲线函数的值。


代码示例
::::::::::

COPY-FROM: paddle.i0e