Skip to content

Commit 8e9d75e

Browse files
committed
映射文档 No.44
1 parent 63362b7 commit 8e9d75e

File tree

1 file changed

+32
-0
lines changed
  • docs/guides/model_convert/convert_from_pytorch/api_difference/ops

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [torch 参数更多 ]torch.greater
2+
3+
### [torch.greater](https://pytorch.org/docs/stable/generated/torch.greater.html?highlight=torch+greater#torch.greater)
4+
5+
```python
6+
torch.greater(input, other, *, out=None)
7+
```
8+
9+
### [paddle.full](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/greater_than_cn.html)
10+
11+
```python
12+
paddle.greater_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.greater([3, 5], 1., out=y)
29+
30+
# Paddle 写法
31+
y = paddle.greater_than([3, 5], 1.)
32+
```

0 commit comments

Comments
 (0)