-
Notifications
You must be signed in to change notification settings - Fork 714
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
【PaddlePaddle Hackathon 3 No.17】为 Paddle 新增 sgn 文档 #5107
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5107.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
这个 API 应该也能通过 以及可添加 PADDLEPADDLE_PR=44568 以确保文档预览可以正确构建,paddle bot 的回复里也有相关链接,可以参考下~
|
.. py:function:: paddle.sgn(x, name=None) | ||
|
||
对输入参数 ``x`` 中每个元素进行正负判断,并且输出正负判断值:1 代表正,-1 代表负,0 代表零。 | ||
对于复数张量,此函数返回一个新的张量,其元素与 input 元素的角度相同且绝对值为 1。 |
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.
这两句与英文的顺序正好是反的,中英文两者顺序也应当是一致的~
以及在 rst 中空一行才能分隔两个段落~可以看下预览里现在的效果~
docs/api/paddle/sgn_cn.rst
Outdated
|
||
参数 | ||
:::::::::::: | ||
- **x** (Tensor) – 输入 Tensor,数据类型为 float16, float32, float64, complex64 或 complex128。 |
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.
- **x** (Tensor) – 输入 Tensor,数据类型为 float16, float32, float64, complex64 或 complex128。 | |
- **x** (Tensor) – 输入 Tensor,数据类型为 float16、float32、float64、complex64 或 complex128。 |
|
||
返回 | ||
:::::::::::: | ||
Tensor,输出正负号或复数的单位向量,数据的 shape 大小及数据类型和输入 ``x`` 一致。 |
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.
这里的话中文应该没问题,英文有点简单了可以修改下,两者也需要一致~
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
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~(虽然没啥用)
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.
good job!LGTM
add docs of paddle.sgn
PADDLEPADDLE_PR=44568