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】16 新增 API paddle.take #5099
Merged
Merged
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e5c7771
add docs for paddle.take
S-HuaBomb c40cb85
fix docs
S-HuaBomb 498c668
fix conflict
S-HuaBomb 1d37f73
fix conflict
S-HuaBomb 6d7633e
fix conflict
S-HuaBomb b8fdee5
Update docs/api/paddle/take_cn.rst
S-HuaBomb a555df0
fix docs
S-HuaBomb 6aada7e
Merge branch 'new-api' of github.com:S-HuaBomb/docs into new-api
S-HuaBomb 013d01f
revert commit 498c668f
S-HuaBomb 93cf5a6
fix revert 498c668fc
S-HuaBomb e2d5299
Revert "fix conflict"
S-HuaBomb 68f3627
Revert "Revert "fix conflict""
S-HuaBomb f6239a7
fix docs
S-HuaBomb 12b3da6
fix take_cn by pre-commit
S-HuaBomb 9b24ee2
fix take_cn by pre-commit
S-HuaBomb 67f3e60
fix take_cn by pre-commit
S-HuaBomb f87a792
fix take_cn by pre-commit
S-HuaBomb 4404d50
fix take_cn.rst by pre-commit
S-HuaBomb 6cbc27c
fix Overview_cn.rst
S-HuaBomb 677189d
Merge branch 'develop' of https://github.com/PaddlePaddle/docs into n…
S-HuaBomb 38801a1
fix doc, add param 'mode'
S-HuaBomb 083cf1a
fix 嵌套列表
S-HuaBomb File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
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 |
---|---|---|
|
@@ -246,6 +246,7 @@ Methods | |
subtract_ | ||
sum | ||
t | ||
take | ||
tanh | ||
tanh_ | ||
tile | ||
|
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,26 @@ | ||
.. _cn_api_paddle_tensor_take: | ||
|
||
take | ||
------------------------------- | ||
|
||
.. py:function:: paddle.take(input, index, name=None) | ||
|
||
返回一个新的 Tensor,其中包含给定索引处的输入元素。 | ||
将输入 Tensor 视为一维 Tensor,返回指定索引上的元素集合,返回结果与 :attr:`index` 的形状相同。 | ||
|
||
参数 | ||
::::::::: | ||
|
||
- **input** (Tensor) - 输入的 Tensor,支持 int32、int64、float32、float64 数据类型。 | ||
- **index** (Tensor) - 索引矩阵,支持 int32、int64 数据类型。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
||
返回 | ||
::::::::: | ||
|
||
Tensor,其中包含给定索引处的输入元素。与 index 的形状相同。 | ||
|
||
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.take |
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.
还有问题,这个是说在句尾多了一个空格
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.
Thx,done