File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
docs/guides/model_convert/convert_from_pytorch/api_difference/ops Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
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
+ ```
You can’t perform that action at this time.
0 commit comments