-
Notifications
You must be signed in to change notification settings - Fork 835
【Paddle Tensor No.21】docs: Add docs for Tensor.bitwise_invert #6932
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.. _cn_api_paddle_bitwise_invert: | ||
|
||
bitwise_invert | ||
------------------------------- | ||
|
||
.. py:function:: paddle.bitwise_invert(x, out=None, name=None) | ||
|
||
对 Tensor ``x`` 逐元素进行 ``按位取反`` 运算。 | ||
|
||
.. math:: | ||
Out = \sim X | ||
|
||
.. note:: | ||
``paddle.bitwise_invert`` 遵守 broadcasting,如您想了解更多,请参见 `Tensor 介绍`_ . | ||
|
||
.. _Tensor 介绍: ../../guides/beginner/tensor_cn.html#id7 | ||
|
||
参数 | ||
:::::::::::: | ||
|
||
- **x** (Tensor)- 输入的 N-D `Tensor`,数据类型为:bool,uint8,int8,int16,int32,int64。 | ||
- **out** (Tensor,可选)- 输出的结果 `Tensor`,是与输入数据类型相同的 N-D `Tensor`。默认值为 None,此时将创建新的 Tensor 来保存输出结果。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
:::::::::::: | ||
``按位取反`` 运算后的结果 ``Tensor``,数据类型与 ``x`` 相同。 | ||
|
||
代码示例 | ||
:::::::::::: | ||
|
||
COPY-FROM: paddle.bitwise_invert |
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.
这里为什么会出现broadcasting的相关描述呢?包括英文的API docstring,bitwise系列都是一元运算,与broadcast没有任何关系吧?
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.
https://github.com/PaddlePaddle/docs/blob/develop/docs/api/paddle/bitwise_not_cn.rst
bitwise_not似乎也有一样的问题,我直接复刻过来没有仔细检查。
我要不要修改一起修改一下?以及我发现里面一些链接坏了:
line 14 Tenosr介绍
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.
暂时只先考虑这个API吧,其他的API之后有时间有精力的话可以再提交一个PR
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.
好的