forked from PaddlePaddle/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add api convert * pytorch-paddle-api-convert-0307 * add api mapping * adjust directory structure
- Loading branch information
1 parent
d982221
commit 88f5888
Showing
269 changed files
with
2,008 additions
and
379 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...om_pytorch/api_difference/functional/torch.nn.functional.adaptive_avg_pool1d.md
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,20 @@ | ||
## torch.nn.functional.adaptive_avg_pool1d | ||
|
||
### [torch.nn.functional.adaptive_avg_pool1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_avg_pool1d.html?highlight=adaptive_avg_pool1d#torch.nn.functional.adaptive_avg_pool1d) | ||
|
||
```python | ||
torch.nn.functional.adaptive_avg_pool1d(input, output_size) | ||
``` | ||
|
||
### [paddle.nn.functional.adaptive_avg_pool1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/adaptive_avg_pool1d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.adaptive_avg_pool1d(x, output_size, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| output_size | output_size | 表示输出 Tensor 的大小。 | |
24 changes: 24 additions & 0 deletions
24
...om_pytorch/api_difference/functional/torch.nn.functional.adaptive_avg_pool2d.md
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,24 @@ | ||
## torch.nn.functional.adaptive_avg_pool2d | ||
|
||
### [torch.nn.functional.adaptive_avg_pool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_avg_pool2d.html?highlight=adaptive_avg_pool2d#torch.nn.functional.adaptive_avg_pool2d) | ||
|
||
```python | ||
torch.nn.functional.adaptive_avg_pool2d(input, output_size) | ||
``` | ||
|
||
### [paddle.nn.functional.adaptive_avg_pool2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/adaptive_avg_pool2d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.adaptive_avg_pool2d(x, | ||
output_size, | ||
data_format='NCHW', | ||
name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| output_size | output_size | 表示输出 Tensor 的大小。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | |
24 changes: 24 additions & 0 deletions
24
...om_pytorch/api_difference/functional/torch.nn.functional.adaptive_avg_pool3d.md
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,24 @@ | ||
## torch.nn.functional.adaptive_avg_pool3d | ||
|
||
### [torch.nn.functional.adaptive_avg_pool3d](https://pytorch.org/docs/stable/generated/torch.ao.nn.quantized.functional.adaptive_avg_pool3d.html?highlight=adaptive_avg_pool3d#torch.ao.nn.quantized.functional.adaptive_avg_pool3d) | ||
|
||
```python | ||
torch.nn.functional.adaptive_avg_pool3d(input, output_size) | ||
``` | ||
|
||
### [paddle.nn.functional.adaptive_avg_pool3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/adaptive_avg_pool3d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.adaptive_avg_pool3d(x, | ||
output_size, | ||
data_format='NCDHW', | ||
name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| output_size | output_size | 表示输出 Tensor 的大小。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | |
26 changes: 26 additions & 0 deletions
26
...om_pytorch/api_difference/functional/torch.nn.functional.adaptive_max_pool1d.md
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 @@ | ||
## torch.nn.functional.adaptive_max_pool1d | ||
|
||
### [torch.nn.functional.adaptive_max_pool1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_max_pool1d.html?highlight=torch+nn+functional+adaptive_max_pool1d#torch.nn.functional.adaptive_max_pool1d) | ||
|
||
```python | ||
torch.nn.functional.adaptive_max_pool1d(input, | ||
output_size, | ||
return_indices=False) | ||
``` | ||
|
||
### [paddle.nn.functional.adaptive_max_pool1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/adaptive_max_pool1d_cn.html#adaptive-max-pool1d) | ||
|
||
```python | ||
paddle.nn.functional.adaptive_max_pool1d(x, | ||
output_size, | ||
return_mask=False, | ||
name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| output_size | output_size | 表示输出 Tensor 的大小。 | | ||
| return_indices | return_mask | 表示是否返回最大值的索引。 | |
26 changes: 26 additions & 0 deletions
26
...om_pytorch/api_difference/functional/torch.nn.functional.adaptive_max_pool2d.md
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 @@ | ||
## torch.nn.functional.adaptive_max_pool2d | ||
|
||
### [torch.nn.functional.adaptive_max_pool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_max_pool2d.html?highlight=adaptive_max_pool2d#torch.nn.functional.adaptive_max_pool2d) | ||
|
||
```python | ||
torch.nn.functional.adaptive_max_pool2d(input, | ||
output_size, | ||
return_indices=False) | ||
``` | ||
|
||
### [paddle.nn.functional.adaptive_max_pool2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/adaptive_max_pool2d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.adaptive_max_pool2d(x, | ||
output_size, | ||
return_mask=False, | ||
name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| output_size | output_size | 表示输出 Tensor 的大小。 | | ||
| return_indices | return_mask | 表示是否返回最大值的索引。 | |
26 changes: 26 additions & 0 deletions
26
...om_pytorch/api_difference/functional/torch.nn.functional.adaptive_max_pool3d.md
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 @@ | ||
## torch.nn.functional.adaptive_max_pool3d | ||
|
||
### [torch.nn.functional.adaptive_max_pool3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_max_pool3d.html?highlight=adaptive_max_pool3d#torch.nn.functional.adaptive_max_pool3d) | ||
|
||
```python | ||
torch.nn.functional.adaptive_max_pool3d(input, | ||
output_size, | ||
return_indices=False) | ||
``` | ||
|
||
### [paddle.nn.functional.adaptive_max_pool3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/adaptive_max_pool3d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.adaptive_max_pool3d(x, | ||
output_size, | ||
return_mask=False, | ||
name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| output_size | output_size | 表示输出 Tensor 的大小。 | | ||
| return_indices | return_mask | 表示是否返回最大值的索引。 | |
29 changes: 29 additions & 0 deletions
29
.../convert_from_pytorch/api_difference/functional/torch.nn.functional.bilinear.md
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 @@ | ||
## torch.nn.functional.bilinear | ||
|
||
### [torch.nn.functional.bilinear](https://pytorch.org/docs/stable/generated/torch.nn.functional.bilinear.html?highlight=bilinear#torch.nn.functional.bilinear) | ||
|
||
```python | ||
torch.nn.functional.bilinear(input1, | ||
input2, | ||
weight, | ||
bias=None) | ||
``` | ||
|
||
### [paddle.nn.functional.bilinear](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/bilinear_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.bilinear(x1, | ||
x2, | ||
weight, | ||
bias=None, | ||
name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input1 | x1 | 表示第一个输入的 Tensor 。 | | ||
| input2 | x2 | 表示第二个输入的 Tensor 。 | | ||
| weight | weight | 表示权重 Tensor 。 | | ||
| bias | bias | 表示偏重 Tensor 。 | |
34 changes: 34 additions & 0 deletions
34
...rt/convert_from_pytorch/api_difference/functional/torch.nn.functional.conv1d.md
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,34 @@ | ||
## torch.nn.functional.conv1d | ||
|
||
### [torch.nn.functional.conv1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.conv1d.html?highlight=conv1d#torch.nn.functional.conv1d) | ||
|
||
```python | ||
torch.nn.functional.conv1d(input, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
dilation=1, | ||
groups=1) | ||
``` | ||
|
||
### [paddle.nn.functional.conv1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/conv1d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.conv1d(x, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
dilation=1, | ||
groups=1, | ||
data_format='NCL', | ||
name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | |
34 changes: 34 additions & 0 deletions
34
...rt/convert_from_pytorch/api_difference/functional/torch.nn.functional.conv2d.md
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,34 @@ | ||
## torch.nn.functional.conv2d | ||
|
||
### [torch.nn.functional.conv2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.conv2d.html?highlight=conv2d#torch.nn.functional.conv2d) | ||
|
||
```python | ||
torch.nn.functional.conv1d(input, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
dilation=1, | ||
groups=1) | ||
``` | ||
|
||
### [paddle.nn.functional.conv2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/conv2d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.conv2d(x, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
dilation=1, | ||
groups=1, | ||
data_format='NCHW', | ||
name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | |
34 changes: 34 additions & 0 deletions
34
...rt/convert_from_pytorch/api_difference/functional/torch.nn.functional.conv3d.md
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,34 @@ | ||
## torch.nn.functional.conv3d | ||
|
||
### [torch.nn.functional.conv3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.conv3d.html?highlight=conv3d#torch.nn.functional.conv3d) | ||
|
||
```python | ||
torch.nn.functional.conv3d(input, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
dilation=1, | ||
groups=1) | ||
``` | ||
|
||
### [paddle.nn.functional.conv3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/conv3d_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.conv3d(x, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
dilation=1, | ||
groups=1, | ||
data_format='NCDHW', | ||
name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | |
38 changes: 38 additions & 0 deletions
38
..._from_pytorch/api_difference/functional/torch.nn.functional.conv_transpose1d.md
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,38 @@ | ||
## torch.nn.functional.conv_transpose1d | ||
|
||
### [torch.nn.functional.conv_transpose1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.conv_transpose1d.html?highlight=conv_trans#torch.nn.functional.conv_transpose1d) | ||
|
||
```python | ||
torch.nn.functional.conv_transpose1d(input, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
output_padding=0, | ||
groups=1, | ||
dilation=1) | ||
``` | ||
|
||
### [paddle.nn.functional.conv1d_transpose](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/conv1d_transpose_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.conv1d_transpose(x, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
output_padding=0, | ||
groups=1, | ||
dilation=1, | ||
output_size=None, | ||
data_format='NCL', | ||
name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| - | output_size | 表示输出 Tensor 的尺寸, PyTorch 无此参数, Paddle 保持默认即可。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | |
38 changes: 38 additions & 0 deletions
38
..._from_pytorch/api_difference/functional/torch.nn.functional.conv_transpose2d.md
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,38 @@ | ||
## torch.nn.functional.conv_transpose2d | ||
|
||
### [torch.nn.functional.conv_transpose2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.conv_transpose2d.html?highlight=conv_#torch.nn.functional.conv_transpose2d) | ||
|
||
```python | ||
torch.nn.functional.conv_transpose2d(input, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
output_padding=0, | ||
groups=1, | ||
dilation=1) | ||
``` | ||
|
||
### [paddle.nn.functional.conv2d_transpose](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/conv2d_transpose_cn.html) | ||
|
||
```python | ||
paddle.nn.functional.conv2d_transpose(x, | ||
weight, | ||
bias=None, | ||
stride=1, | ||
padding=0, | ||
output_padding=0, | ||
groups=1, | ||
dilation=1, | ||
data_format='NCHW', | ||
output_size=None, | ||
name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: | ||
### 参数差异 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| input | x | 表示输入的 Tensor 。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | | ||
| - | output_size | 表示输出 Tensor 的尺寸, PyTorch 无此参数, Paddle 保持默认即可。 | |
Oops, something went wrong.