Skip to content

Commit 988454b

Browse files
committed
映射文档 No.44
1 parent 8e9d75e commit 988454b

File tree

9 files changed

+260
-4
lines changed

9 files changed

+260
-4
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.fmax
2+
3+
### [torch.fmax](https://pytorch.org/docs/stable/generated/torch.fmax.html#torch.fmax)
4+
5+
```python
6+
torch.fmax(input, other, *, out=None)
7+
```
8+
9+
### [paddle.fmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/fmax_cn.html)
10+
11+
```python
12+
paddle.fmax(x, y, name=None)
13+
```
14+
15+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
| ------------- | ------------ | ------------------------------------------------------ |
19+
| input | x | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。|
20+
| other | y | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
23+
24+
### 转写示例
25+
#### out:指定输出
26+
```python
27+
# Pytorch 写法
28+
torch.fmax([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.fmax([3, 5], 1.)
32+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.fmin
2+
3+
### [torch.fmin](https://pytorch.org/docs/stable/generated/torch.fmin.html#torch.fmin)
4+
5+
```python
6+
torch.fmin(input, other, *, out=None)
7+
```
8+
9+
### [paddle.fmin](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/fmin_cn.html)
10+
11+
```python
12+
paddle.fmin(x, y, name=None)
13+
```
14+
15+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
| ------------- | ------------ | ------------------------------------------------------ |
19+
| input | x | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。|
20+
| other | y | 输入的 Tensor。数据类型为 float16 、 float32 、 float64 、 int32 或 int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
23+
24+
### 转写示例
25+
#### out:指定输出
26+
```python
27+
# Pytorch 写法
28+
torch.fmin([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.fmin([3, 5], 1.)
32+
```

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
torch.greater(input, other, *, out=None)
77
```
88

9-
### [paddle.full](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/greater_than_cn.html)
9+
### [paddle.greater_than](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/greater_than_cn.html)
1010

1111
```python
1212
paddle.greater_than(x, y, name=None)
@@ -16,9 +16,9 @@ paddle.greater_than(x, y, name=None)
1616
### 参数映射
1717
| PyTorch | PaddlePaddle | 备注 |
1818
| ------------- | ------------ | ------------------------------------------------------ |
19-
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
20-
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
21-
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
19+
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
20+
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
2222

2323

2424
### 转写示例
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.le
2+
3+
### [torch.le](https://pytorch.org/docs/stable/generated/torch.le.html)
4+
5+
```python
6+
torch.le(input, other, *, out=None)
7+
```
8+
9+
### [paddle.less_equal](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/less_equal_cn.html)
10+
11+
```python
12+
paddle.less_equal(x, y, name=None)
13+
```
14+
15+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
| ------------- | ------------ | ------------------------------------------------------ |
19+
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
20+
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
23+
24+
### 转写示例
25+
#### out:指定输出
26+
```python
27+
# Pytorch 写法
28+
torch.le([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.less_equal([3, 5], 1.)
32+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.less
2+
3+
### [torch.less](https://pytorch.org/docs/stable/generated/torch.less.html#torch.less)
4+
5+
```python
6+
torch.less(input, other, *, out=None)
7+
```
8+
9+
### [paddle.less_than](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/less_than_cn.html)
10+
11+
```python
12+
paddle.less_than(x, y, name=None)
13+
```
14+
15+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
| ------------- | ------------ | ------------------------------------------------------ |
19+
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
20+
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
23+
24+
### 转写示例
25+
#### out:指定输出
26+
```python
27+
# Pytorch 写法
28+
torch.less([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.less_than([3, 5], 1.)
32+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.less_equal
2+
3+
### [torch.less_equal](https://pytorch.org/docs/stable/generated/torch.less_equal.html#torch.less_equal)
4+
5+
```python
6+
torch.less_equal(input, other, *, out=None)
7+
```
8+
9+
### [paddle.less_equal](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/less_equal_cn.html)
10+
11+
```python
12+
paddle.less_equal(x, y, name=None)
13+
```
14+
15+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
| ------------- | ------------ | ------------------------------------------------------ |
19+
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
20+
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
23+
24+
### 转写示例
25+
#### out:指定输出
26+
```python
27+
# Pytorch 写法
28+
torch.less_equal([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.less_equal([3, 5], 1.)
32+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.lt
2+
3+
### [torch.lt](https://pytorch.org/docs/stable/generated/torch.lt.html#torch.lt)
4+
5+
```python
6+
torch.lt(input, other, *, out=None)
7+
```
8+
9+
### [paddle.less_than](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/less_than_cn.html)
10+
11+
```python
12+
paddle.less_than(x, y, name=None)
13+
```
14+
15+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
| ------------- | ------------ | ------------------------------------------------------ |
19+
| input | x | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
20+
| other | y | 输入 Tensor,支持的数据类型包括 bool、float32、float64、int32、int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
23+
24+
### 转写示例
25+
#### out:指定输出
26+
```python
27+
# Pytorch 写法
28+
torch.lt([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.less_than([3, 5], 1.)
32+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.maximum
2+
3+
### [torch.maximum](https://pytorch.org/docs/stable/generated/torch.maximum.html#torch.maximum)
4+
5+
```python
6+
torch.maximum(input, other, *, out=None)
7+
```
8+
9+
### [paddle.maximum](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/maximum_cn.html)
10+
11+
```python
12+
paddle.maximum(x, y, name=None)
13+
```
14+
15+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
| ------------- | ------------ | ------------------------------------------------------ |
19+
| input | x | 输入的 Tensor。数据类型为 float32 、 float64 、 int32 或 int64。|
20+
| other | y | 输入的 Tensor。数据类型为 float32 、 float64 、 int32 或 int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
23+
24+
### 转写示例
25+
#### out:指定输出
26+
```python
27+
# Pytorch 写法
28+
torch.maximum([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.maximum([3, 5], 1.)
32+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.minimum
2+
3+
### [torch.minimum](https://pytorch.org/docs/stable/generated/torch.minimum.html#torch.minimum)
4+
5+
```python
6+
torch.minimum(input, other, *, out=None)
7+
```
8+
9+
### [paddle.minimum](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/minimum_cn.html)
10+
11+
```python
12+
paddle.minimum(x, y, name=None)
13+
```
14+
15+
其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
| ------------- | ------------ | ------------------------------------------------------ |
19+
| input | x | 输入的 Tensor。数据类型为 float32 、 float64 、 int32 或 int64。|
20+
| other | y | 输入的 Tensor。数据类型为 float32 、 float64 、 int32 或 int64。 |
21+
| out | - | 表示输出的 Tensor , Paddle 无此参数,需要进行转写。 |
22+
23+
24+
### 转写示例
25+
#### out:指定输出
26+
```python
27+
# Pytorch 写法
28+
torch.minimum([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.maximum([3, 5], 1.)
32+
```

0 commit comments

Comments
 (0)