Skip to content
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
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 仅参数名不一致 ]torch.tensor_split
## [ 输入参数用法不一致 ]torch.tensor_split
### [torch.tensor_split](https://pytorch.org/docs/stable/generated/torch.tensor_split.html)

```python
Expand All @@ -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 | 表示需要分割的维度,仅参数名不一致。 |