-
Notifications
You must be signed in to change notification settings - Fork 823
log_cn.rst #7236
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
Closed
Closed
log_cn.rst #7236
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1,30 +1,33 @@ | ||
.. _cn_api_paddle_log: | ||
|
||
log | ||
------------------------------- | ||
|
||
.. py:function:: paddle.log(x, name=None) | ||
|
||
|
||
|
||
|
||
paddle.log(x, name=None) | ||
Log 激活函数(计算自然对数) | ||
|
||
.. math:: | ||
\\Out=ln(x)\\ | ||
|
||
.. math:: | ||
Out=ln(x) | ||
|
||
参数 | ||
:::::::::::: | ||
|
||
- **x** (Tensor) – 输入为 Tensor。数据类型只能为 int32,int64,float16,bfloat16,float32, float64, complex64 或 complex128。 | ||
::::::::: | ||
- **x** (Tensor) – 输入的 Tensor。数据类型只能为 int32、int64、float16、bfloat16、float32、float64、 complex64 或 complex128 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 一般使用中文逗号隔开,这里不需要修改 |
||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
:::::::::::: | ||
::::::::: | ||
Tensor, Log 算子自然对数输出,数据类型与输入一致。 | ||
|
||
代码示例 | ||
:::::::::::: | ||
:::::::::: | ||
|
||
>>>import paddle | ||
|
||
>>>x = [[2, 3, 4], [7, 8, 9]] | ||
|
||
>>>x = paddle.to_tensor(x, dtype='float32') | ||
|
||
>>>print(paddle.log(x)) | ||
|
||
Tensor(shape=[2, 3], dtype=float32, place=Place(cpu), stop_gradient=True, | ||
|
||
COPY-FROM: paddle.log | ||
[[0.69314718, 1.09861231, 1.38629436], | ||
[1.94591010, 2.07944155, 2.19722462]]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. COPY-FROM: paddle.log 是从英文文档的代码示例中自动复制过来,不需要直接写明代码示例吧~ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
需要使用 py:function:: 格式,具体请参考其他文档的撰写方法