-
Notifications
You must be signed in to change notification settings - Fork 721
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
Update torch.tensor_split.md #6733
Open
Zhang-Zhenkun
wants to merge
1
commit into
PaddlePaddle:develop
Choose a base branch
from
Zhang-Zhenkun:patch-2
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## [ 仅参数名不一致 ]torch.tensor_split | ||
## [ 输入参数用法不一致 ]torch.tensor_split | ||
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. 分类应为 仅参数名不一致 |
||
### [torch.tensor_split](https://pytorch.org/docs/stable/generated/torch.tensor_split.html) | ||
|
||
```python | ||
|
@@ -11,12 +11,12 @@ torch.tensor_split(input, indices_or_sections, dim=0) | |
paddle.tensor_split(x, num_or_indices, axis=0, name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: | ||
其中 Paddle的num_or_indices 与 PyTorch 的indices_or_sections用法不一致,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor ,仅参数名不一致。 | | ||
| indices_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 | | ||
| indices_or_sections | num_or_indices | indices_or_sections必须分开成indices和sections使用,且均可作为位置参数或关键字参数,num_or_indices不可分开。 | | ||
| dim | axis | 表示需要分割的维度,仅参数名不一致。 | |
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.
这个是参数重载的方式,还是直接分两个API签名来写,第一个API签名是indices、第二个API签名是sections,你参考
torch.max
的写法。另外,修改comment直接在原分支上重新git push -f,不需要每次都关闭和重建RP。