Skip to content

Commit 3defa04

Browse files
committed
1 parent 63362b7 commit 3defa04

File tree

10 files changed

+218
-20
lines changed

10 files changed

+218
-20
lines changed

docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.arcsin.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## [torch 参数更多 ]torch.arcsin
22

3-
### [torch.arcsin](https://pytorch.org/docs/stable/generated/torch.arcsin.html?highlight=arcsin#torch.arcsin)
3+
### [torch.arcsin](https://pytorch.org/docs/1.13/generated/torch.arcsin.html#torch.arcsin)
44

55
```python
66
torch.arcsin(input,
@@ -20,16 +20,16 @@ paddle.asin(x,
2020
### 参数映射
2121
| PyTorch | PaddlePaddle | 备注 |
2222
| ------------- | ------------ | ------------------------------------------------------ |
23-
| <font color='red'>input</font> | <font color='red'>x</font> | 输入的 Tensor ,仅参数名不同|
24-
| <font color='red'>out</font> | - | 表示输出的 Tensor ,PaddlePaddle 无此参数,需要转写 |
23+
| input | x | 输入的 Tensor ,仅参数名不一致|
24+
| out | - | 表示输出的 Tensor ,PaddlePaddle 无此参数,需要转写。 |
2525

2626

2727
### 转写示例
2828
#### out:指定输出
2929
```python
3030
# Pytorch 写法
31-
torch.arcsin([-0.5962, 1.4985], out=y)
31+
torch.arcsin(torch.tensor([-0.5962, 0.4985]), out=y)
3232

3333
# Paddle 写法
34-
paddle.assign(paddle.asin([-0.5962, 1.4985]), y)
34+
paddle.assign(paddle.asin(paddle.to_tensor([-0.5962, 0.4985])), y)
3535
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## [torch 参数更多 ]torch.arcsin
2+
3+
### [torch.arcsinh](https://pytorch.org/docs/1.13/generated/torch.arcsinh.html#torch.arcsinh)
4+
5+
```python
6+
torch.arcsinh(input,
7+
*,
8+
out=None)
9+
```
10+
11+
### [paddle.asinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/asinh_cn.html)
12+
13+
```python
14+
paddle.asinh(x,
15+
name=None)
16+
```
17+
18+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
19+
20+
### 参数映射
21+
| PyTorch | PaddlePaddle | 备注 |
22+
| ------------- | ------------ | ------------------------------------------------------ |
23+
| input | x | 输入的 Tensor ,仅参数名不一致。 |
24+
| out | - | 表示输出的 Tensor ,PaddlePaddle 无此参数,需要转写。 |
25+
26+
27+
### 转写示例
28+
#### out:指定输出
29+
```python
30+
# Pytorch 写法
31+
torch.arcsinh(torch.tensor([-0.5962, 0.4985]), out=y)
32+
33+
# Paddle 写法
34+
paddle.assign(paddle.asinh(paddle.to_tensor([-0.5962, 0.4985])), y)
35+
```

docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.arctan.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## [torch 参数更多 ]torch.arctan
22

3-
### [torch.arctan](https://pytorch.org/docs/stable/generated/torch.arctan.html?highlight=arctan#torch.arctan)
3+
### [torch.arctan](https://pytorch.org/docs/1.13/generated/torch.arctan.html#torch.arctan)
44

55
```python
66
torch.arctan(input,
@@ -20,16 +20,16 @@ paddle.atan(x,
2020
### 参数映射
2121
| PyTorch | PaddlePaddle | 备注 |
2222
| ------------- | ------------ | ------------------------------------------------------ |
23-
| <font color='red'>input</font> | <font color='red'>x</font> | 输入的 Tensor ,仅参数名不同 |
24-
| <font color='red'>out</font> | - | 表示输出的 Tensor,PaddlePaddle 无此参数,需要转写 |
23+
| input | x | 输入的 Tensor ,仅参数名不一致|
24+
| out | - | 表示输出的 Tensor,PaddlePaddle 无此参数,需要转写。 |
2525

2626

2727
### 转写示例
2828
#### out:指定输出
2929
```python
3030
# Pytorch 写法
31-
torch.arctan([0.2341, 0.2539], out=y)
31+
torch.arctan(torch.tensor([0.2341, 0.2539]), out=y)
3232

3333
# Paddle 写法
34-
paddle.assign(paddle.atan([0.2341, 0.2539]), y)
34+
paddle.assign(paddle.atan(paddle.to_tensor([0.2341, 0.2539])), y)
3535
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## [torch 参数更多 ]torch.arctanh
2+
### [torch.arctanh](https://pytorch.org/docs/1.13/generated/torch.arctanh.html#torch.arctanh)
3+
4+
```python
5+
torch.arctanh(input,
6+
*,
7+
out=None)
8+
```
9+
10+
### [paddle.atanh](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/atanh_cn.html)
11+
12+
```python
13+
paddle.atanh(x,
14+
name=None)
15+
```
16+
17+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
18+
19+
### 参数映射
20+
| PyTorch | PaddlePaddle | 备注 |
21+
| ------------- | ------------ | ------------------------------------------------------ |
22+
| input | x | 表示输入的 Tensor ,仅参数名不一致。 |
23+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
24+
25+
26+
### 转写示例
27+
#### out:指定输出
28+
```python
29+
# Pytorch 写法
30+
torch.arctanh(torch.tensor([ 0.2341, 0.2539]), out=y)
31+
32+
# Paddle 写法
33+
paddle.assign(paddle.atanh(paddle.to_tensor([ 0.2341, 0.2539])), y)
34+
```

docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.asin.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## [torch 参数更多 ]torch.asin
2-
### [torch.asin](https://pytorch.org/docs/stable/generated/torch.asin.html?highlight=asin#torch.asin)
2+
### [torch.asin](https://pytorch.org/docs/1.13/generated/torch.asin.html#torch.asin)
33

44
```python
55
torch.asin(input,
@@ -18,16 +18,16 @@ paddle.asin(x,
1818
### 参数映射
1919
| PyTorch | PaddlePaddle | 备注 |
2020
| ------------- | ------------ | ------------------------------------------------------ |
21-
| <font color='red'>input</font>| <font color='red'>x</font> | 表示输入的 Tensor ,仅参数名不同|
22-
| <font color='red'>out</font> | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
21+
| input | x | 表示输入的 Tensor ,仅参数名不一致|
22+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
2323

2424

2525
### 转写示例
2626
#### out:指定输出
2727
```python
2828
# Pytorch 写法
29-
torch.asin([-0.5962, 1.4985], out=y)
29+
torch.asin(torch.tensor([-0.5962, 0.4985]), out=y)
3030

3131
# Paddle 写法
32-
paddle.assign(paddle.asin([-0.5962, 1.4985]), y)
32+
paddle.assign(paddle.asin(paddle.to_tensor([-0.5962, 0.4985])), y)
3333
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## [torch 参数更多 ]torch.asinh
2+
### [torch.asinh](https://pytorch.org/docs/1.13/generated/torch.asinh.html#torch.asinh)
3+
4+
```python
5+
torch.asinh(input,
6+
*,
7+
out=None)
8+
```
9+
10+
### [paddle.asinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/asinh_cn.html)
11+
12+
```python
13+
paddle.asinh(x,
14+
name=None)
15+
```
16+
17+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
18+
### 参数映射
19+
| PyTorch | PaddlePaddle | 备注 |
20+
| ------------- | ------------ | ------------------------------------------------------ |
21+
| input | x | 表示输入的 Tensor ,仅参数名不一致。 |
22+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
23+
24+
25+
### 转写示例
26+
#### out:指定输出
27+
```python
28+
# Pytorch 写法
29+
torch.asinh(torch.tensor([-0.5962, 0.4985]), out=y)
30+
31+
# Paddle 写法
32+
paddle.assign(paddle.asinh(paddle.to_tensor([-0.5962, 0.4985])), y)
33+
```

docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.atan.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## [torch 参数更多 ]torch.atan
2-
### [torch.atan](https://pytorch.org/docs/stable/generated/torch.atan.html?highlight=atan#torch.atan)
2+
### [torch.atan](https://pytorch.org/docs/1.13/generated/torch.atan.html#torch.atan)
33

44
```python
55
torch.atan(input,
@@ -19,16 +19,16 @@ paddle.atan(x,
1919
### 参数映射
2020
| PyTorch | PaddlePaddle | 备注 |
2121
| ------------- | ------------ | ------------------------------------------------------ |
22-
| <font color='red'>input</font>| <font color='red'>x</font> | 表示输入的 Tensor ,仅参数名不同|
23-
| <font color='red'>out</font> | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
| input | x | 表示输入的 Tensor ,仅参数名不一致|
23+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
2424

2525

2626
### 转写示例
2727
#### out:指定输出
2828
```python
2929
# Pytorch 写法
30-
torch.atan([ 0.2341, 0.2539], out=y)
30+
torch.atan(torch.tensor([ 0.2341, 0.2539]), out=y)
3131

3232
# Paddle 写法
33-
paddle.assign(paddle.atan([ 0.2341, 0.2539]), y)
33+
paddle.assign(paddle.atan(paddle.to_tensor([ 0.2341, 0.2539])), y)
3434
```
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## [torch 参数更多 ]torch.atan2
2+
### [torch.atan2](https://pytorch.org/docs/1.13/generated/torch.atan2.html#torch.atan2)
3+
4+
```python
5+
torch.atan2(input,
6+
other,
7+
*,
8+
out=None)
9+
```
10+
11+
### [paddle.atan2](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/atan2_cn.html)
12+
13+
```python
14+
paddle.atan2(x,
15+
y,
16+
name=None)
17+
```
18+
19+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
20+
21+
### 参数映射
22+
| PyTorch | PaddlePaddle | 备注 |
23+
| ------------- | ------------ | ------------------------------------------------------ |
24+
| input | x | 表示输入的 Tensor ,仅参数名不一致。 |
25+
| other | y | 表示输入的 Tensor ,仅参数名不一致。 |
26+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
27+
28+
29+
### 转写示例
30+
#### out:指定输出
31+
```python
32+
# Pytorch 写法
33+
torch.atan2(torch.tensor([0.2,0.3]),torch.tensor([0.4,0.5]),out=y)
34+
35+
# Paddle 写法
36+
paddle.assign(paddle.atan2(paddle.to_tensor([0.2,0.3]),paddle.to_tensor([0.4,0.5])),y)
37+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## [torch 参数更多 ]torch.atanh
2+
### [torch.atanh](https://pytorch.org/docs/1.13/generated/torch.atanh.html#torch.atanh)
3+
4+
```python
5+
torch.atanh(input,
6+
*,
7+
out=None)
8+
```
9+
10+
### [paddle.atanh](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/atanh_cn.html)
11+
12+
```python
13+
paddle.atanh(x,
14+
name=None)
15+
```
16+
17+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
18+
19+
### 参数映射
20+
| PyTorch | PaddlePaddle | 备注 |
21+
| ------------- | ------------ | ------------------------------------------------------ |
22+
| input | x | 表示输入的 Tensor ,仅参数名不一致。 |
23+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
24+
25+
26+
### 转写示例
27+
#### out:指定输出
28+
```python
29+
# Pytorch 写法
30+
torch.atanh(torch.tensor([ 0.2341, 0.2539]), out=y)
31+
32+
# Paddle 写法
33+
paddle.assign(paddle.atanh(paddle.to_tensor([ 0.2341, 0.2539])), y)
34+
```
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## [ 仅参数名不一致 ] torch.bitwise_not
2+
3+
### [torch.bitwise_not](https://pytorch.org/docs/1.13/generated/torch.bitwise_not.html?highlight=bitwise_not#torch.bitwise_not)
4+
5+
```python
6+
torch.bitwise_not(input,
7+
*,
8+
out=None)
9+
```
10+
11+
### [paddle.bitwise_not](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/bitwise_not_cn.html)
12+
13+
```python
14+
paddle.bitwise_not(x,
15+
out=None,
16+
name=None)
17+
```
18+
19+
两者功能一致且参数用法一致,仅参数名不同,具体如下:
20+
21+
### 参数映射
22+
| PyTorch | PaddlePaddle | 备注 |
23+
| ------------- | ------------ | ------------------------------------------------------ |
24+
| input | x | 输入的 Tensor ,仅参数名不一致。 |
25+
| out | out | 表示输出的 Tensor,参数名一致。 |

0 commit comments

Comments
 (0)