-
Notifications
You must be signed in to change notification settings - Fork 764
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
【Hackathon 5th No.1】 为 Paddle 新增 copysign API 中文文档 #6417
Merged
Merged
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a63a036
add householder_product_cn doc
cocoshe 7cba614
doc style
cocoshe 7bbe6cf
Merge branch 'develop' of https://github.com/PaddlePaddle/docs into c…
cocoshe 473b081
add copysign cn doc
cocoshe cb2dffd
modify math
cocoshe bf03076
modify math
cocoshe af8a53b
fix doc
cocoshe 998258e
fix doc, add inplace doc
cocoshe 80a62c3
Update docs/api/paddle/Overview_cn.rst
cocoshe 19f38eb
add inplace
cocoshe dc5e9f2
docstyle
cocoshe a69bc6a
update
cocoshe 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 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,35 @@ | ||
.. _cn_api_paddle_copysign: | ||
|
||
copysign | ||
------------------------------- | ||
|
||
.. py:function:: paddle.copysign(x, y, name=None) | ||
|
||
|
||
按照元素计算两个输入 Tensor 的 copysign 大小,由数值和符号组成,其数值部分来自于第一个 Tensor 中的元素,符号部分来自于第二个 Tensor 中的元素。 | ||
|
||
.. math:: | ||
|
||
copysign(x_{i},y_{i})=\left\{\begin{matrix} | ||
& -|x_{i}| & if \space y_{i} <= -0.0\\ | ||
& |x_{i}| & if \space y_{i} >= 0.0 | ||
\end{matrix}\right. | ||
|
||
|
||
参数 | ||
:::::::::::: | ||
|
||
- **x** (Tensor) - 输入的复数值的 Tensor,数据类型为:bool, uint8, int8, int16, int32, int64, bfloat16, float16, float32, float64。 | ||
- **y** (Tensor) - 输入的复数值的 Tensor,数据类型为:bool, uint8, int8, int16, int32, int64, bfloat16, float16, float32, float64。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
:::::::::::: | ||
|
||
Tensor,输出数据类型与输入数据类型相同。 | ||
|
||
|
||
代码示例 | ||
:::::::::::: | ||
|
||
COPY-FROM: paddle.copysign | ||
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 代码块,参考 中文API文档复制英文API文档示例代码 比如 |
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.
overview里也要加上 copysign_