Skip to content

Commit

Permalink
Fix API docs (PaddlePaddle#6844)
Browse files Browse the repository at this point in the history
* fix hsplit

* fix docs

* fix

* fix-docs1

* fix docs
  • Loading branch information
Xuxuanang authored and molly committed Sep 4, 2024
1 parent dec6f2d commit 93c3b29
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
## [ 仅参数名不一致 ]torch.Tensor.dsplit
api 存在重载情况,分别如下:

-------------------------------------------------------------------------------------------------

### [torch.Tensor.dsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.dsplit.html)

```python
torch.Tensor.dsplit(sections)
```

### [paddle.Tensor.dsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#dsplit-num_or_indices-name-none)

```python
paddle.Tensor.dsplit(num_or_indices, name=None)
```

其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| sections | num_or_indices | 表示分割的数量,仅参数名不一致。 |

-------------------------------------------------------------------------------------------------

### [torch.Tensor.dsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.dsplit.html)

```python
torch.Tensor.dsplit(split_size_or_sections)
torch.Tensor.dsplit(indices)
```

### [paddle.Tensor.dsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#dsplit-num_or_indices-name-none)
Expand All @@ -18,4 +43,4 @@ paddle.Tensor.dsplit(num_or_indices, name=None)

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| split_size_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 |
| indices | num_or_indices | 表示分割的索引,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
## [ 仅参数名不一致 ]torch.Tensor.hsplit
api 存在重载情况,分别如下:

-------------------------------------------------------------------------------------------------

### [torch.Tensor.hsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.hsplit.html)

```python
torch.Tensor.hsplit(sections)
```

### [paddle.Tensor.hsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#hsplit-num_or_indices-name-none)

```python
paddle.Tensor.hsplit(num_or_indices, name=None)
```

其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| sections | num_or_indices | 表示分割的数量,仅参数名不一致。 |

-------------------------------------------------------------------------------------------------

### [torch.Tensor.hsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.hsplit.html)

```python
torch.Tensor.hsplit(split_size_or_sections)
torch.Tensor.hsplit(indices)
```

### [paddle.Tensor.hsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#hsplit-num_or_indices-name-none)
Expand All @@ -18,4 +43,4 @@ paddle.Tensor.hsplit(num_or_indices, name=None)

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| split_size_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 |
| indices | num_or_indices | 表示分割的索引,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,8 +1,51 @@
## [ 仅参数名不一致 ]torch.Tensor.tensor_split
api 存在重载情况,分别如下:

-------------------------------------------------------------------------------------------------

### [torch.Tensor.tensor_split](https://pytorch.org/docs/stable/generated/torch.Tensor.tensor_split.html)

```python
torch.Tensor.tensor_split(indices, dim=0)
```

### [paddle.Tensor.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor_split-num_or_indices-axis-0-name-none)

```python
paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None)
```

其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| indices | num_or_indices | 表示分割的索引,仅参数名不一致。 |
| dim | axis | 表示需要分割的维度,仅参数名不一致。 |

-------------------------------------------------------------------------------------------------

### [torch.Tensor.tensor_split](https://pytorch.org/docs/stable/generated/torch.Tensor.tensor_split.html)

```python
torch.Tensor.tensor_split(tensor_indices_or_sections, dim=0)
```

### [paddle.Tensor.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor_split-num_or_indices-axis-0-name-none)

```python
paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None)
```

Paddle 当前无对应功能,功能缺失。

-------------------------------------------------------------------------------------------------

### [torch.Tensor.tensor_split](https://pytorch.org/docs/stable/generated/torch.Tensor.tensor_split.html)

```python
torch.Tensor.tensor_split(indices_or_sections, dim=0)
torch.Tensor.tensor_split(sections, dim=0)
```

### [paddle.Tensor.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor_split-num_or_indices-axis-0-name-none)
Expand All @@ -17,5 +60,5 @@ paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None)

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| indices_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 |
| sections | num_or_indices | 表示分割的数量,仅参数名不一致。 |
| dim | axis | 表示需要分割的维度,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
## [ 仅参数名不一致 ]torch.dsplit
api 存在重载情况,分别如下:

-------------------------------------------------------------------------------------------------

### [torch.dsplit](https://pytorch.org/docs/stable/generated/torch.dsplit.html#torch.dsplit)

```python
torch.dsplit(input,
sections)
```

### [paddle.dsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/dsplit_cn.html)

```python
paddle.dsplit(x,
num_or_indices,
name=None)
```

其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 输入多维 Tensor ,仅参数名不一致。 |
| sections | num_or_indices | 表示分割的数量,仅参数名不一致。 |

-------------------------------------------------------------------------------------------------

### [torch.dsplit](https://pytorch.org/docs/stable/generated/torch.dsplit.html#torch.dsplit)

```python
torch.dsplit(input,
indices_or_sections)
indices)
```

### [paddle.dsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/dsplit_cn.html)
Expand All @@ -21,4 +51,4 @@ paddle.dsplit(x,
| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 输入多维 Tensor ,仅参数名不一致。 |
| indices_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 |
| indices | num_or_indices | 表示分割的索引,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
## [ 仅参数名不一致 ]torch.hsplit
api 存在重载情况,分别如下:

-------------------------------------------------------------------------------------------------

### [torch.hsplit](https://pytorch.org/docs/stable/generated/torch.hsplit.html#torch.hsplit)

```python
torch.hsplit(input,
        sections)
```

### [paddle.hsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hsplit_cn.html)

```python
paddle.hsplit(x,
        num_or_indices,
        name=None)
```

其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下:

### 参数映射

| PyTorch       | PaddlePaddle | 备注                                                   |
| ------------- | ------------ | ------------------------------------------------------ |
| input          |  x           | 输入多维 Tensor ,仅参数名不一致。  |
| sections           | num_or_indices         | 表示分割的数量,仅参数名不一致。                          |

-------------------------------------------------------------------------------------------------

### [torch.hsplit](https://pytorch.org/docs/stable/generated/torch.hsplit.html#torch.hsplit)

```python
torch.hsplit(input,
indices_or_sections)
        indices)
```

### [paddle.hsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hsplit_cn.html)

```python
paddle.hsplit(x,
num_or_indices,
name=None)
        num_or_indices,
        name=None)
```

其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| PyTorch       | PaddlePaddle | 备注                                                   |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 输入多维 Tensor ,仅参数名不一致。 |
| indices_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 |
| input          |  x           | 输入多维 Tensor ,仅参数名不一致。  |
| indices           | num_or_indices         | 表示分割的数量,仅参数名不一致。                          |
Original file line number Diff line number Diff line change
@@ -1,8 +1,52 @@
## [ 仅参数名不一致 ]torch.tensor_split
api 存在重载情况,分别如下:

-------------------------------------------------------------------------------------------------

### [torch.tensor_split](https://pytorch.org/docs/stable/generated/torch.tensor_split.html)

```python
torch.tensor_split(input, indices, dim=0)
```

### [paddle.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/tensor_split_cn.html)

```python
paddle.tensor_split(x, num_or_indices, axis=0, name=None)
```

其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 表示输入的 Tensor ,仅参数名不一致。 |
| indices | num_or_indices | 表示分割的索引,仅参数名不一致。 |
| dim | axis | 表示需要分割的维度,仅参数名不一致。 |

-------------------------------------------------------------------------------------------------

### [torch.tensor_split](https://pytorch.org/docs/stable/generated/torch.tensor_split.html)

```python
torch.tensor_split(input, tensor_indices_or_sections, dim=0)
```

### [paddle.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/tensor_split_cn.html)

```python
paddle.tensor_split(x, num_or_indices, axis=0, name=None)
```

paddle 当前无对应功能,功能缺失。

-------------------------------------------------------------------------------------------------

### [torch.tensor_split](https://pytorch.org/docs/stable/generated/torch.tensor_split.html)

```python
torch.tensor_split(input, indices_or_sections, dim=0)
torch.tensor_split(input, sections, dim=0)
```

### [paddle.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/tensor_split_cn.html)
Expand All @@ -18,5 +62,5 @@ paddle.tensor_split(x, num_or_indices, axis=0, name=None)
| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 表示输入的 Tensor ,仅参数名不一致。 |
| indices_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 |
| sections | num_or_indices | 表示分割的数量,仅参数名不一致。 |
| dim | axis | 表示需要分割的维度,仅参数名不一致。 |

0 comments on commit 93c3b29

Please sign in to comment.