-
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 No.5] add tril_indices op docs #4599
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4d7a556
add tril_indices API doc
xiaoguoguo626807 7c3f237
add tril_indices API doc
xiaoguoguo626807 1231839
modify tril_indices
xiaoguoguo626807 2f25ba4
Merge branch 'PaddlePaddle:develop' into develop
xiaoguoguo626807 8c64cf5
modify tril_indices_cn.rst
xiaoguoguo626807 db5fc37
Merge branch 'develop' of github.com:xiaoguoguo626807/docs into develop
xiaoguoguo626807 8b80551
modify tril_indices document
xiaoguoguo626807 c178247
modify tril_indices document
xiaoguoguo626807 1ddee0a
modify tril_indices document
xiaoguoguo626807 df729e7
rewrite rst
xiaoguoguo626807 da89d50
modify rst
xiaoguoguo626807 e7d7a49
modify rst
xiaoguoguo626807 5613bbd
modify rst
xiaoguoguo626807 a4c91cf
modify rst
xiaoguoguo626807 61038a3
modify tril_indices rst
xiaoguoguo626807 c4b0393
modify tril_indices rst
xiaoguoguo626807 98b718f
modify tril_indices rst
xiaoguoguo626807 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.. _cn_api_tensor_tril_indices: | ||
|
||
tril_indices | ||
-------------------------------- | ||
|
||
.. py:function:: paddle.tril_indices(row, col, offset=0, dtype='int64') | ||
|
||
返回行数和列数已知的二维矩阵中下三角矩阵元素的行列坐标,其中下三角矩阵为原始矩阵某一对角线左下部分元素的子矩阵。 | ||
|
||
参数 | ||
::::::::: | ||
- **row** (int) - 输入矩阵的行数。 | ||
- **col** (int) - 输入矩阵的列数。 | ||
- **offset** (int,可选) - 确定从指定二维平面中获取对角线的位置。 | ||
|
||
+ 如果 offset = 0, 取主对角线。 | ||
+ 如果 offset > 0, 取主对角线右上的对角线。 | ||
+ 如果 offset < 0, 取主对角线左下的对角线。 | ||
|
||
- **dtype** (int,可选) - 指定输出张量的数据类型,默认值为int64。 | ||
|
||
返回 | ||
::::::::: | ||
Tensor,二维矩阵的下三角矩阵行坐标和列坐标。数据类型和参数dtype一致。 | ||
|
||
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.tril_indices:tril_indices-example |
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.
代码示例使用copy-from的形式,参考文档