-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add gcd * add gcd * add ge * add outer * add get_divice * add gt * add hardshrink * add heaviside * add hist * fix * fix * fix * fix * fix * fix * fix * Update torch.Tensor.gcd.md * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Update torch.Tensor.hardshrink.md * Update torch.Tensor.hardshrink.md * Apply suggestions from code review * Apply suggestions from code review * Update torch.Tensor.histc.md * Update torch.Tensor.histc.md
- Loading branch information
1 parent
63362b7
commit 23e54b4
Showing
10 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...es/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.gcd.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,19 @@ | ||
## [ 仅参数名不一致 ]torch.Tensor.gcd | ||
|
||
### [torch.Tensor.gcd](https://pytorch.org/docs/1.13/generated/torch.Tensor.gcd.html?highlight=torch+tensor+gcd#torch.Tensor.gcd) | ||
|
||
```python | ||
torch.Tensor.gcd(other) | ||
``` | ||
|
||
### [paddle.Tensor.gcd](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#gcd-x-y-name-none) | ||
|
||
```python | ||
paddle.Tensor.gcd(y, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> other </font> | <font color='red'> y </font> | 输入的 Tensor ,仅参数名不同。 | |
19 changes: 19 additions & 0 deletions
19
...des/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.ge.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,19 @@ | ||
## [ 仅参数名不一致 ]torch.Tensor.ge | ||
|
||
### [torch.Tensor.ge](https://pytorch.org/docs/1.13/generated/torch.Tensor.ge.html?highlight=torch+tensor+ge#torch.Tensor.ge) | ||
|
||
```python | ||
torch.Tensor.ge(other) | ||
``` | ||
|
||
### [paddle.Tensor.greater_equal](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#greater-equal-y-name-none) | ||
|
||
```python | ||
paddle.Tensor.greater_equal(y, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> other </font> | <font color='red'> y </font> | 输入的 Tensor ,仅参数名不同。 | |
19 changes: 19 additions & 0 deletions
19
...es/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.ger.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,19 @@ | ||
## [ 仅参数名不一致 ]torch.Tensor.ger | ||
|
||
### [torch.Tensor.ger](https://pytorch.org/docs/1.13/generated/torch.Tensor.ger.html?highlight=torch+tensor+ger#torch.Tensor.ger) | ||
|
||
```python | ||
torch.Tensor.ger(vec2) | ||
``` | ||
|
||
### [paddle.Tensor.outer]() | ||
|
||
```python | ||
paddle.Tensor.outer(y, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|--------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> vec2 </font> | <font color='red'> y </font> | 输入的 Tensor ,仅参数名不同。 | |
15 changes: 15 additions & 0 deletions
15
...l_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.get_device.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.get_device | ||
|
||
### [torch.Tensor.get_device](https://pytorch.org/docs/1.13/generated/torch.Tensor.get_device.html?highlight=torch+tensor+get_device#torch.Tensor.get_device) | ||
|
||
```python | ||
torch.Tensor.get_device() | ||
``` | ||
|
||
### [paddle.device.get_device]() | ||
|
||
```python | ||
paddle.device.get_device() | ||
``` | ||
|
||
两者功能一致且无参数。 |
19 changes: 19 additions & 0 deletions
19
...odel_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.greater.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,19 @@ | ||
## [ 仅参数名不一致 ]torch.Tensor.greater | ||
|
||
### [torch.Tensor.greater](https://pytorch.org/docs/1.13/generated/torch.Tensor.greater.html?highlight=torch+tensor+greater#torch.Tensor.greater) | ||
|
||
```python | ||
torch.Tensor.greater(other) | ||
``` | ||
|
||
### [paddle.Tensor.greater_than](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#greater-than-y-name-none) | ||
|
||
```python | ||
paddle.Tensor.greater_than(y, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> other </font> | <font color='red'> y </font> | 输入的 Tensor ,仅参数名不同。 | |
19 changes: 19 additions & 0 deletions
19
...onvert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.greater_equal.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,19 @@ | ||
## [ 仅参数名不一致 ]torch.Tensor.greater_equal | ||
|
||
### [torch.Tensor.greater_equal](https://pytorch.org/docs/1.13/generated/torch.Tensor.greater_equal.html?highlight=torch+tensor+greater_equal#torch.Tensor.greater_equal) | ||
|
||
```python | ||
torch.Tensor.greater_equal(other) | ||
``` | ||
|
||
### [paddle.Tensor.greater_equal](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#greater-equal-y-name-none) | ||
|
||
```python | ||
paddle.Tensor.greater_equal(y, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> other </font> | <font color='red'> y </font> | 输入的 Tensor ,仅参数名不同。 | |
19 changes: 19 additions & 0 deletions
19
...des/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.gt.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,19 @@ | ||
## [ 仅参数名不一致 ]torch.Tensor.gt | ||
|
||
### [torch.Tensor.gt](https://pytorch.org/docs/1.13/generated/torch.Tensor.gt.html?highlight=torch+tensor+gt#torch.Tensor.gt) | ||
|
||
```python | ||
torch.Tensor.gt(other) | ||
``` | ||
|
||
### [paddle.Tensor.greater_than](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#greater-than-y-name-none) | ||
|
||
```python | ||
paddle.Tensor.greater_than(y, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> other </font> | <font color='red'> y </font> | 输入的 Tensor ,仅参数名不同。 | |
21 changes: 21 additions & 0 deletions
21
...l_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.hardshrink.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.Tensor.hardshrink | ||
|
||
### [torch.Tensor.hardshrink](https://pytorch.org/docs/1.13/generated/torch.Tensor.hardshrink.html?highlight=torch+tensor+hardshrink#torch.Tensor.hardshrink) | ||
|
||
```python | ||
torch.Tensor.hardshrink(lambd=0.5) | ||
``` | ||
|
||
### [paddle.Tensor.hardshrink]() | ||
|
||
```python | ||
paddle.Tensor.hardshrink(threshold=0.5, name=None) | ||
``` | ||
|
||
两者功能一致且参数用法一致。 | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
|-----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> lambd </font> | <font color='red'> threshold </font> | Hardshrink 阈值,仅参数名不同。 | |
19 changes: 19 additions & 0 deletions
19
...el_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.heaviside.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,19 @@ | ||
## [ 仅参数名不一致 ]torch.Tensor.heaviside | ||
|
||
### [torch.Tensor.heaviside](https://pytorch.org/docs/1.13/generated/torch.Tensor.heaviside.html?highlight=torch+tensor+heaviside#torch.Tensor.heaviside) | ||
|
||
```python | ||
torch.Tensor.heaviside(values) | ||
``` | ||
|
||
### [paddle.Tensor.heaviside](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#heaviside-y-name-none) | ||
|
||
```python | ||
paddle.Tensor.heaviside(y, name=None) | ||
``` | ||
|
||
两者功能一致,仅参数名不一致,具体如下: | ||
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
|-----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> values </font> | <font color='red'> y </font> | 输入的 Tensor ,仅参数名不同。 | |
23 changes: 23 additions & 0 deletions
23
.../model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.histc.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.histc | ||
|
||
### [torch.Tensor.histc](https://pytorch.org/docs/1.13/generated/torch.Tensor.histc.html?highlight=torch+tensor+histc#torch.Tensor.histc) | ||
|
||
```python | ||
torch.Tensor.histc(bins=100, min=0, max=0) | ||
``` | ||
|
||
### [paddle.Tensor.histogram](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#histogram-bins-100-min-0-max-0) | ||
|
||
```python | ||
paddle.Tensor.histogram(bins=100, min=0, max=0, name=None) | ||
``` | ||
|
||
两者功能一致且参数完全一致。 | ||
|
||
### 参数映射 | ||
|
||
| PyTorch | PaddlePaddle | 备注 | | ||
|-----------------------------------|------------------------------| ------------------------------------------------------ | | ||
| <font color='red'> bins </font> | <font color='red'> bins </font> | 直方图 bins(直条)的个数,默认为 100。 | | ||
| <font color='red'> min </font> | <font color='red'> min </font> | range 的下边界(包含),默认为 0。 | | ||
| <font color='red'> max </font> | <font color='red'> max </font> | range 的上边界(包含),默认为 0。 | |