-
Notifications
You must be signed in to change notification settings - Fork 765
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
【Hackathon 5th No.25】为 Paddle 新增 gammaln API (#6439)
* 【Hackathon 5th No.25】为 Paddle 新增 gammaln API * fix * Update docs/api/paddle/gammaln_cn.rst Co-authored-by: zachary sun <70642955+sunzhongkai588@users.noreply.github.com> * fix bug --------- Co-authored-by: zachary sun <70642955+sunzhongkai588@users.noreply.github.com>
- Loading branch information
1 parent
b505c10
commit 94d346d
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. _cn_api_paddle_gammaln_: | ||
|
||
gammaln\_ | ||
------------------------------- | ||
|
||
.. py:function:: paddle.gammaln_(x, name=None) | ||
Inplace 版本的 :ref:`cn_api_paddle_gammaln` API,对输入 `x` 采用 Inplace 策略。 | ||
|
||
更多关于 inplace 操作的介绍请参考 `3.1.3 原位(Inplace)操作和非原位操作的区别`_ 了解详情。 | ||
|
||
.. _3.1.3 原位(Inplace)操作和非原位操作的区别: https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/beginner/tensor_cn.html#id3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.. _cn_api_paddle_gammaln: | ||
|
||
gammaln | ||
------------------------------- | ||
|
||
.. py:function:: paddle.gammaln(x, name=None) | ||
逐元素计算伽马函数的绝对值的自然对数。 | ||
|
||
参数 | ||
:::::::::::: | ||
|
||
- **x** - 输入 Tensor。数据类型必须为 float16, float32, float64, bfloat16。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
:::::::::::: | ||
输出为 Tensor,与 ``x`` 维度相同、数据类型相同。 | ||
|
||
代码示例 | ||
:::::::::::: | ||
|
||
COPY-FROM: paddle.gammaln |