-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...l_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.nan_to_num.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,23 @@ | ||
## [参数完全一致]torch.Tensor.nan_to_num | ||
|
||
### [torch.Tensor.nan_to_num](https://pytorch.org/docs/1.13/generated/torch.Tensor.nan_to_num.html#torch.Tensor.nan_to_num) | ||
|
||
```python | ||
torch.Tensor.nan_to_num(nan=0.0, posinf=None, neginf=None) | ||
``` | ||
|
||
### [paddle.Tensor.nan_to_num](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#nan-to-num) | ||
|
||
```python | ||
paddle.Tensor.nan_to_num(nan=0.0, posinf=None, neginf=None) | ||
``` | ||
|
||
两者功能一致,且参数用法一致,具体如下: | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------- | ------------ | --------------- | | ||
| nan | nan | NaN 的替换值。 | | ||
| posinf | posinf | +inf 的替换值。 | | ||
| neginf | neginf | -inf 的替换值。 | |
23 changes: 23 additions & 0 deletions
23
...el_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.nextafter.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,23 @@ | ||
## [仅参数名不一致]torch.Tensor.nextafter | ||
|
||
### [torch.Tensor.nextafter](https://pytorch.org/docs/1.13/generated/torch.Tensor.nextafter.html#torch.Tensor.nextafter) | ||
|
||
```python | ||
torch.Tensor.nextafter(other) | ||
``` | ||
|
||
### [paddle.Tensor.nextafter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nextafter_cn.html) | ||
|
||
```python | ||
paddle.Tensor.nextafter(y) | ||
``` | ||
|
||
其中 xxx 相比 xxx 支持更多其他参数,具体如下: | ||
|
||
### 参数映射 | ||
|
||
两者功能一致,且参数用法一致,仅参数名不同,具体如下: | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------- | ------------ | ---------------------------------- | | ||
| other | y | 输⼊第二个 Tensor,仅参数名不同。 | |