-
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
[Fix] fix pytorch-paddle mapping index generate #6463
Changes from 19 commits
b771c3e
76ec449
7954d32
3c6f66e
8846c1c
7ff1097
b8fa05b
a31bb5c
fb3b1f4
99e9575
f9c5a3f
79d5bf9
74526b2
0007685
b24bfa7
49de344
38bb480
fc414c5
db07186
80e41ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
api_mappings.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## [ 参数完全一致 ] torch.nn.AdaptiveAvgPool1d | ||
|
||
### [torch.nn.AdaptiveAvgPool1d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveAvgPool1d.html) | ||
|
||
```python | ||
torch.nn.AdaptiveAvgPool1d(output_size) | ||
``` | ||
|
||
### [paddle.nn.AdaptiveAvgPool1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/AdaptiveAvgPool1D_cn.html#adaptiveavgpool1d) | ||
|
||
```python | ||
paddle.nn.AdaptiveAvgPool1D(output_size, name=None) | ||
``` | ||
|
||
两者功能一致,参数完全一致。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## [ 仅 paddle 参数更多 ] torch.nn.AdaptiveAvgPool2d | ||
|
||
### [torch.nn.AdaptiveAvgPool2d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveAvgPool2d.html) | ||
|
||
```python | ||
torch.nn.AdaptiveAvgPool2d(output_size) | ||
``` | ||
|
||
### [paddle.nn.AdaptiveAvgPool2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/AdaptiveAvgPool2D_cn.html#adaptiveavgpool2d) | ||
|
||
```python | ||
paddle.nn.AdaptiveAvgPool2D(output_size, data_format='NCHW', name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| output_size | output_size | 表示输出 Tensor 的 size 。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## [ 仅 paddle 参数更多 ] torch.nn.AdaptiveAvgPool3d | ||
|
||
### [torch.nn.AdaptiveAvgPool3d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveAvgPool3d.html) | ||
|
||
```python | ||
torch.nn.AdaptiveAvgPool3d(output_size) | ||
``` | ||
|
||
### [paddle.nn.AdaptiveAvgPool3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/AdaptiveAvgPool3D_cn.html#adaptiveavgpool3d) | ||
|
||
```python | ||
paddle.nn.AdaptiveAvgPool3D(output_size, data_format='NCDHW', name=None) | ||
``` | ||
|
||
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| output_size | output_size | 表示输出 Tensor 的 size 。 | | ||
| - | data_format | 表示输入 Tensor 的数据格式, PyTorch 无此参数, Paddle 保持默认即可。 | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## [ 无参数 ] torch.nn.LogSigmoid | ||
|
||
### [torch.nn.LogSigmoid](https://pytorch.org/docs/stable/generated/torch.nn.LogSigmoid.html) | ||
|
||
```python | ||
torch.nn.LogSigmoid(*args, **kwargs) | ||
``` | ||
|
||
### [paddle.nn.LogSigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/LogSigmoid_cn.html#logsigmoid) | ||
|
||
```python | ||
paddle.nn.LogSigmoid(name=None) | ||
``` | ||
|
||
两者功能一致,均无参数。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## [ 无参数 ] torch.nn.Sigmoid | ||
|
||
### [torch.nn.Sigmoid](https://pytorch.org/docs/stable/generated/torch.nn.Sigmoid.html) | ||
|
||
```python | ||
torch.nn.Sigmoid(*args, **kwargs) | ||
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可以输入参数,paddle不能输入。torch参数更多? |
||
``` | ||
|
||
### [paddle.nn.Sigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/Sigmoid_cn.html#sigmoid) | ||
|
||
```python | ||
paddle.nn.Sigmoid(name=None) | ||
``` | ||
|
||
两者功能一致,均无参数。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## [ 参数完全一致 ] torch.nn.Softplus | ||
|
||
### [torch.nn.Softplus](https://pytorch.org/docs/stable/generated/torch.nn.Softplus.html) | ||
|
||
```python | ||
torch.nn.Softplus(beta=1, threshold=20) | ||
``` | ||
|
||
### [paddle.nn.Softplus](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/Softplus_cn.html) | ||
|
||
```python | ||
paddle.nn.Softplus(beta=1, threshold=20, name=None) | ||
``` | ||
|
||
两者功能一致,参数完全一致。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## [ 无参数 ] torch.nn.Softsign | ||
|
||
### [torch.nn.Softsign](https://pytorch.org/docs/stable/generated/torch.nn.Softsign.html) | ||
|
||
```python | ||
torch.nn.Softsign(*args, **kwargs) | ||
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可以输入参数,paddle不能输入。torch参数更多? |
||
``` | ||
|
||
### [paddle.nn.Softsign](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/Softsign_cn.html) | ||
|
||
```python | ||
paddle.nn.Softsign(name=None) | ||
``` | ||
|
||
两者功能一致,均无参数。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## [ 参数完全一致 ] torch.nn.Tanh | ||
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.nn.Tanh](https://pytorch.org/docs/stable/generated/torch.nn.Tanh.html) | ||
|
||
```python | ||
torch.nn.Tanh(*args, **kwargs) | ||
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可以输入参数,paddle不能输入。torch参数更多? |
||
``` | ||
|
||
### [paddle.nn.Tanh](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/Tanh_cn.html) | ||
|
||
```python | ||
paddle.nn.Tanh(name=None) | ||
``` | ||
|
||
两者功能一致,参数完全一致。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## [ 无参数 ] torch.nn.Tanhshrink | ||
|
||
### [torch.nn.Tanhshrink](https://pytorch.org/docs/stable/generated/torch.nn.Tanhshrink.html) | ||
|
||
```python | ||
torch.nn.Tanhshrink(*args, **kwargs) | ||
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可以输入参数,paddle不能输入。torch参数更多? |
||
``` | ||
|
||
### [paddle.nn.Tanhshrink](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/Tanhshrink_cn.html) | ||
|
||
```python | ||
paddle.nn.Tanhshrink(name=None) | ||
``` | ||
|
||
两者功能一致,均无参数。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## [ 参数完全一致 ] torch.nn.TripletMarginWithDistanceLoss | ||
|
||
### [torch.nn.TripletMarginWithDistanceLoss](https://pytorch.org/docs/stable/generated/torch.nn.TripletMarginWithDistanceLoss.html) | ||
|
||
```python | ||
torch.nn.TripletMarginWithDistanceLoss(*, distance_function=None, margin=1.0, swap=False, reduction='mean') | ||
``` | ||
|
||
### [paddle.nn.TripletMarginWithDistanceLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/TripletMarginWithDistanceLoss_cn.html#tripletmarginwithdistanceloss) | ||
|
||
```python | ||
paddle.nn.TripletMarginWithDistanceLoss(distance_function=None, margin: float = 1.0, swap: bool = False, reduction: str = 'mean', name: str = None) | ||
``` | ||
|
||
两者功能一致,参数完全一致。 |
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.
这个不是paddle参数更多?