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

new api paddle.trunc #3585

Merged
merged 10 commits into from
Jun 16, 2021
Merged

new api paddle.trunc #3585

merged 10 commits into from
Jun 16, 2021

Conversation

zhangbo9674
Copy link
Contributor

@zhangbo9674 zhangbo9674 commented Jun 9, 2021

Add docstring for new paddle API: paddle.trunc(x, name=none).
中文文档:
图片

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 9, 2021

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Jun 9, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@TCChenlong TCChenlong left a 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后的矩阵,如果输入矩阵的数据类型为整数,则不做处理。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

输入矩阵数据 -> 输入 Tensor
矩阵 -> Tensor
输入矩阵 -> 输入 Tensor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done,thanks!

将输入矩阵数据的小数部分置0,返回置0后的矩阵,如果输入矩阵的数据类型为整数,则不做处理。


参数:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参数: ->
参数
:::::::::(9个英文冒号)

Copy link
Contributor Author

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。

返回:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

返回: ->
返回
:::::::::(9个英文冒号)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done,thanks!

- Tensor (Tensor),矩阵截断后的结果。


**代码示例**:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码示例: ->
代码示例
:::::::::(9个英文冒号)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done,thanks!

Copy link
Collaborator

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TCChenlong TCChenlong merged commit 59ba097 into PaddlePaddle:develop Jun 16, 2021
RichardWooSJTU pushed a commit to RichardWooSJTU/docs that referenced this pull request Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants