-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
【Hackathon 5th No.43】API转换21-41 (#6280)
* Add api_mapping * Fix * Fix
- Loading branch information
Showing
7 changed files
with
55 additions
and
9 deletions.
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
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
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
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ torch.broadcast_tensors(x, y) | |
# Paddle 写法 | ||
paddle.broadcast_tensors([x, y]) | ||
``` | ||
‘ |
21 changes: 21 additions & 0 deletions
21
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.finfo.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,21 @@ | ||
## [仅参数名不一致]torch.finfo | ||
|
||
### [torch.finfo](https://pytorch.org/docs/stable/type_info.html#torch-finfo) | ||
|
||
```python | ||
torch.finfo(type) | ||
``` | ||
|
||
### [paddle.finfo](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/finfo_cn.html) | ||
|
||
```python | ||
paddle.finfo(dtype) | ||
``` | ||
|
||
两者功能一致,参数名不一致,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------- | ------------ | -------------------------------- | | ||
| type | dtype | 输入的数据类型,仅参数名不一致。 | |
21 changes: 21 additions & 0 deletions
21
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.iinfo.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,21 @@ | ||
## [参数完全一致]torch.iinfo | ||
|
||
### [torch.iinfo](https://pytorch.org/docs/stable/type_info.html#torch-iinfo) | ||
|
||
```python | ||
torch.iinfo(type) | ||
``` | ||
|
||
### [paddle.iinfo](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/iinfo_cn.html) | ||
|
||
```python | ||
paddle.iinfo(dtype) | ||
``` | ||
|
||
paddle 参数和 torch 参数完全一致,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------- | ------------ | -------------------------------- | | ||
| type | dtype | 输入的数据类型,仅参数名不一致。 | |
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