Skip to content

Commit 3f43c97

Browse files
authored
映射文档 No 20 (#5733)
* '提交api映射文档(第20组api)' * '映射文档(20组)' * '按修改意见进行了修改' * '按意见修改后提交' * '按修改意见修改后提交' * '按修改意见进行了修改'
1 parent 608817a commit 3f43c97

10 files changed

+148
-15
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ]torch.Tensor.arcsinh
2+
3+
### [torch.Tensor.arcsinh](https://pytorch.org/docs/stable/generated/torch.Tensor.arcsinh)
4+
5+
```python
6+
torch.Tensor.arcsinh()
7+
```
8+
9+
### [paddle.Tensor.asinh]()
10+
11+
```python
12+
paddle.Tensor.asinh()
13+
```
14+
15+
两者功能一致,均无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ]torch.Tensor.asinh
2+
3+
### [torch.Tensor.asinh](https://pytorch.org/docs/stable/generated/torch.Tensor.asinh)
4+
5+
```python
6+
torch.Tensor.asinh()
7+
```
8+
9+
### [paddle.Tensor.asinh]()
10+
11+
```python
12+
paddle.Tensor.asinh()
13+
```
14+
15+
两者功能一致,均无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ] torch.Tensor.rsqrt
2+
3+
### [ torch.Tensor.rsqrt](https://pytorch.org/docs/stable/generated/torch.Tensor.rsqrt)
4+
5+
```python
6+
torch.Tensor.rsqrt()
7+
```
8+
9+
### [paddle.Tensor.rsqrt](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#rsqrt-name-none)
10+
11+
```python
12+
paddle.Tensor.rsqrt()
13+
```
14+
15+
两者功能一致,均无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ]torch.Tensor.rsqrt_
2+
3+
### [torch.Tensor.rsqrt_](https://pytorch.org/docs/stable/generated/torch.Tensor.rsqrt_)
4+
5+
```python
6+
torch.Tensor.rsqrt_()
7+
```
8+
9+
### [paddle.Tensor.rsqrt_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#id15)
10+
11+
```python
12+
paddle.Tensor.rsqrt_()
13+
```
14+
15+
两者功能一致,均无参数。
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## [ 仅参数名不一致 ]torch.Tensor.select
2+
3+
### [torch.Tensor.select](https://pytorch.org/docs/stable/generated/torch.Tensor.select.html?highlight=select#torch.Tensor.select)
4+
5+
```python
6+
torch.Tensor.select(dim, index)
7+
```
8+
9+
### [paddle.index_select](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#index-select-index-axis-0-name-none)
10+
11+
```python
12+
paddle.Tensor.index_select(index, axis=0, name=None)
13+
```
14+
15+
两者功能一致且参数用法一致,仅参数名不一致,具体如下:
16+
17+
### 参数映射
18+
19+
| PyTorch | PaddlePaddle | 备注 |
20+
| ------------- | ------------ | ------------------------------------------------------ |
21+
| dim | axis | 指定进行运算的轴,仅参数名不同。 |
22+
| index | index | 包含索引下标的 1-D Tensor |
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
1-
## torch.Tensor.sigmoid
2-
### [torch.Tensor.sigmoid](https://pytorch.org/docs/stable/generated/torch.Tensor.sigmoid.html?highlight=torch+sigmoid#torch.Tensor.sigmoid)
1+
## [ 无参数 ]torch.Tensor.sigmoid
2+
3+
### [torch.Tensor.sigmoid](https://pytorch.org/docs/stable/generated/torch.Tensor.sigmoid)
34

45
```python
56
torch.Tensor.sigmoid()
67
```
78

8-
### [paddle.nn.functional.sigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/sigmoid_cn.html)
9+
### [paddle.Tensor.sigmoid]()
910

1011
```python
11-
paddle.nn.functional.sigmoid(x, name=None)
12+
paddle.Tensor.sigmoid()
1213
```
1314

14-
两者功能一致,参数一致,但 torch 是类成员方式,paddle 是 funtion 调用方式。
15-
16-
### 转写示例
17-
18-
```python
19-
# torch 写法
20-
x.sigmoid()
21-
22-
# paddle 写法
23-
paddle.nn.functional.sigmoid(x)
24-
```
15+
两者功能一致,均无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ]torch.Tensor.sign
2+
3+
### [torch.Tensor.sign](https://pytorch.org/docs/stable/generated/torch.Tensor.sign)
4+
5+
```python
6+
torch.Tensor.sign()
7+
```
8+
9+
### [paddle.Tensor.sign](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#sign-name-none)
10+
11+
```python
12+
paddle.Tensor.sign()
13+
```
14+
15+
两者功能一致,均无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ]torch.Tensor.sin
2+
3+
### [torch.Tensor.sin](https://pytorch.org/docs/stable/generated/torch.Tensor.sin)
4+
5+
```python
6+
torch.Tensor.sin()
7+
```
8+
9+
### [paddle.Tensor.sin](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#sin-name-none)
10+
11+
```python
12+
paddle.Tensor.sin()
13+
```
14+
15+
两者功能一致,均无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ]torch.Tensor.sinh
2+
3+
### [torch.Tensor.sinh](https://pytorch.org/docs/1.13/generated/torch.Tensor.sinh.html?highlight=torch+tensor+sinh#torch.Tensor.sinh)
4+
5+
```python
6+
torch.Tensor.sinh()
7+
```
8+
9+
### [paddle.Tensor.sinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#sinh-name-none)
10+
11+
```python
12+
paddle.Tensor.sinh()
13+
```
14+
15+
两者功能一致,均无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ]torch.Tensor.slogdet
2+
3+
### [torch.Tensor.slogdet](https://pytorch.org/docs/stable/generated/torch.Tensor.slogdet.html?highlight=torch+tensor+slogdet#torch.Tensor.slogdet)
4+
5+
```python
6+
torch.Tensor.slogdet()
7+
```
8+
9+
### [paddle.linalg.slogdet](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/slogdet_cn.html)
10+
11+
```python
12+
paddle.linalg.slogdet(x)
13+
```
14+
15+
两者功能一致,均无参数。

0 commit comments

Comments
 (0)