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 md file * fix * fix * fix error
- Loading branch information
Showing
10 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...onvert/convert_from_pytorch/api_difference/Tensor/tensor.Torch.count_nonzero.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 @@ | ||
## [ 仅 Paddle 参数更多 ] torch.Tensor.count_nonzero | ||
|
||
### [torch.Tensor.count_nonzero](https://pytorch.org/docs/stable/generated/torch.Tensor.count_nonzero.html?highlight=count_non#torch.Tensor.count_nonzero) | ||
|
||
```python | ||
torch.Tensor.count_nonzero(dim=None) | ||
``` | ||
|
||
### [paddle.Tensor.count_nonzero](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#count-nonzero-axis-none-keepdim-false-name-none) | ||
|
||
```python | ||
paddle.Tensor.count_nonzero(axis=None, keepdim=False, name=None) | ||
``` | ||
|
||
两者功能一致,仅 paddle 参数更多,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|---------|--------------| ----------------------------------------------------- | | ||
| dim | axis | 指定对 x 进行计算的轴,仅参数名不一致。 | | ||
| - | keepdim | 是否在输出 Tensor 中保留减小的维度,PyTorch 无此参数, Paddle 保持默认即可。 | |
15 changes: 15 additions & 0 deletions
15
.../model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.acosh.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,15 @@ | ||
## [ 无参数 ] torch.Tensor.acosh | ||
|
||
### [torch.Tensor.acosh](https://pytorch.org/docs/stable/generated/torch.Tensor.acosh.html?highlight=acosh#torch.Tensor.acosh) | ||
|
||
```python | ||
torch.Tensor.acosh() | ||
``` | ||
|
||
### [paddle.Tensor.acosh]() | ||
|
||
```python | ||
paddle.Tensor.acosh(name=None) | ||
``` | ||
|
||
两者功能完全一致,无参数。 |
20 changes: 20 additions & 0 deletions
20
.../model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.chunk.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.Tensor.chunk | ||
|
||
### [torch.Tensor.chunk](https://pytorch.org/docs/stable/generated/torch.Tensor.chunk.html?highlight=chunk#torch.Tensor.chunk) | ||
|
||
```python | ||
torch.Tensor.chunk(chunks, dim=0) | ||
``` | ||
|
||
### [paddle.Tensor.chunk](paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#chunk-chunks-axis-0-name-none) | ||
|
||
```python | ||
paddle.Tensor.chunk(chunks, axis=0, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|------------| ------------ | ------------------------------------------------------ | | ||
| chunks | chunks | 表示将输入 Tensor 划分成多少个相同大小的子 Tensor。 | | ||
| dim | axis | 表示需要分割的维度,仅参数名不一致。 | |
20 changes: 20 additions & 0 deletions
20
.../model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.clamp.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.Tensor.clamp | ||
|
||
### [torch.Tensor.clamp](https://pytorch.org/docs/stable/generated/torch.Tensor.clamp.html?highlight=clamp#torch.Tensor.clamp) | ||
|
||
```python | ||
torch.Tensor.clamp(min=None, max=None) | ||
``` | ||
|
||
### [paddle.Tensor.clip](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#clip-min-none-max-none-name-none) | ||
|
||
```python | ||
paddle.Tensor.clip(min=None, max=None, name=None) | ||
``` | ||
|
||
两者功能一致,参数完全一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|---------|--------------| -------------------------------------------------- | | ||
| min | min | 裁剪的最小值,输入中小于该值的元素将由该元素代替。 | | ||
| max | max | 裁剪的最大值,输入中大于该值的元素将由该元素代替。 | |
20 changes: 20 additions & 0 deletions
20
...model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.clamp_.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.Tensor.clamp_ | ||
|
||
### [torch.Tensor.clamp_](https://pytorch.org/docs/stable/generated/torch.Tensor.clamp_.html?highlight=clamp_#torch.Tensor.clamp_) | ||
|
||
```python | ||
torch.Tensor.clamp_(min=None, max=None) | ||
``` | ||
|
||
### [paddle.Tensor.clip_](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#id6) | ||
|
||
```python | ||
paddle.Tensor.clip_(min=None, max=None, name=None) | ||
``` | ||
|
||
两者功能一致,参数完全一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|---------|--------------|---------------------------| | ||
| min | min | 裁剪的最小值,输入中小于该值的元素将由该元素代替。 | | ||
| max | max | 裁剪的最大值,输入中大于该值的元素将由该元素代替。 | |
20 changes: 20 additions & 0 deletions
20
...s/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.clip.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.Tensor.clip | ||
|
||
### [torch.Tensor.clip](https://pytorch.org/docs/stable/generated/torch.Tensor.clip.html?highlight=clip#torch.Tensor.clip) | ||
|
||
```python | ||
torch.Tensor.clip(min=None, max=None) | ||
``` | ||
|
||
### [paddle.Tensor.clip](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#clip-min-none-max-none-name-none) | ||
|
||
```python | ||
paddle.Tensor.clip(min=None, max=None, name=None) | ||
``` | ||
|
||
两者功能一致,参数完全一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|---------|--------------| -------------------------------------------------- | | ||
| min | min | 裁剪的最小值,输入中小于该值的元素将由该元素代替。 | | ||
| max | max | 裁剪的最大值,输入中大于该值的元素将由该元素代替。 | |
20 changes: 20 additions & 0 deletions
20
.../model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.clip_.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.Tensor.clip_ | ||
|
||
### [torch.Tensor.clip_](https://pytorch.org/docs/stable/generated/torch.Tensor.clip_.html?highlight=clip_#torch.Tensor.clip_) | ||
|
||
```python | ||
torch.Tensor.clip_(min=None, max=None) | ||
``` | ||
|
||
### [paddle.Tensor.clip_](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#id6) | ||
|
||
```python | ||
paddle.Tensor.clip_(min=None, max=None, name=None) | ||
``` | ||
|
||
两者功能一致,参数完全一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|---------|--------------|---------------------------| | ||
| min | min | 裁剪的最小值,输入中小于该值的元素将由该元素代替。 | | ||
| max | max | 裁剪的最大值,输入中大于该值的元素将由该元素代替。 | |
15 changes: 15 additions & 0 deletions
15
...s/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.conj.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,15 @@ | ||
## [ 无参数 ] torch.Tensor.conj | ||
|
||
### [torch.Tensor.conj](https://pytorch.org/docs/stable/generated/torch.Tensor.conj.html?highlight=conj#torch.Tensor.conj) | ||
|
||
```python | ||
torch.Tensor.conj() | ||
``` | ||
|
||
### [paddle.Tensor.conj](paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#conj-name-none) | ||
|
||
```python | ||
paddle.Tensor.conj(name=None) | ||
``` | ||
|
||
两者功能完全一致,无参数。 |
15 changes: 15 additions & 0 deletions
15
...es/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.cos.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,15 @@ | ||
## [ 无参数 ] torch.Tensor.cos | ||
|
||
### [torch.Tensor.cos](https://pytorch.org/docs/stable/generated/torch.Tensor.cos.html?highlight=cos#torch.Tensor.cos) | ||
|
||
```python | ||
torch.Tensor.cos() | ||
``` | ||
|
||
### [paddle.Tensor.cos](paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#cos-name-none) | ||
|
||
```python | ||
paddle.Tensor.cos(name=None) | ||
``` | ||
|
||
两者功能完全一致,无参数。 |
15 changes: 15 additions & 0 deletions
15
...s/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.cosh.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,15 @@ | ||
## [ 无参数 ] torch.Tensor.cosh | ||
|
||
### [torch.Tensor.cosh](https://pytorch.org/docs/stable/generated/torch.Tensor.cosh.html?highlight=cosh#torch.Tensor.cosh) | ||
|
||
```python | ||
torch.Tensor.cosh() | ||
``` | ||
|
||
### [paddle.Tensor.cosh](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#cosh-name-none) | ||
|
||
```python | ||
paddle.Tensor.cosh(name=None) | ||
``` | ||
|
||
两者功能完全一致,无参数。 |