-
Notifications
You must be signed in to change notification settings - Fork 724
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
new api paddle.trunc #3585
new api paddle.trunc #3585
Conversation
Thanks for your contribution! |
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.
只需要修改docs/下的文件,doc下的文件请删除
新增API,需要在 docs/Overview_cn.rst at develop · PaddlePaddle/docs 这里新增该API的索引
.. py:function:: paddle.trunc(input, name=None) | ||
|
||
|
||
将输入矩阵数据的小数部分置0,返回置0后的矩阵,如果输入矩阵的数据类型为整数,则不做处理。 |
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.
输入矩阵数据 -> 输入 Tensor
矩阵 -> Tensor
输入矩阵 -> 输入 Tensor
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.
Done,thanks!
将输入矩阵数据的小数部分置0,返回置0后的矩阵,如果输入矩阵的数据类型为整数,则不做处理。 | ||
|
||
|
||
参数: |
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.
参数: ->
参数
:::::::::(9个英文冒号)
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.
Done,thanks!
- **input** (Tensor) : 输入变量,类型为 Tensor, 支持int、float、double数据类型。 | ||
- **name** (str,可选)- 具体用法请参见 :ref:`api_guide_Name` ,一般无需设置,默认值为None。 | ||
|
||
返回: |
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.
返回: ->
返回
:::::::::(9个英文冒号)
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.
Done,thanks!
- Tensor (Tensor),矩阵截断后的结果。 | ||
|
||
|
||
**代码示例**: |
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.
代码示例: ->
代码示例
:::::::::(9个英文冒号)
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.
Done,thanks!
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.
LGTM
Add docstring for new paddle API: paddle.trunc(x, name=none).
中文文档: