Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

映射文档 No 20 #5733

Merged
merged 11 commits into from
Apr 11, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [ 无参数 ]torch.Tensor.arcsinh

### [torch.Tensor.arcsinh](https://pytorch.org/docs/stable/generated/torch.Tensor.arcsinh)

```python
torch.Tensor.arcsin()
hongtushi marked this conversation as resolved.
Show resolved Hide resolved
```

### [paddle.Tensor.asinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#asinh-name-none)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个官网链接是空的吧,直接为空就可以了,目前在Tensor页面还没更新asinh~


```python
paddle.Tensor.asinh()
```

两者功能一致,均无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [ 无参数 ]torch.Tensor.asinh

### [torch.Tensor.asinh](https://pytorch.org/docs/stable/generated/torch.Tensor.asinh)

```python
torch.Tensor.asinh()
```

### [paddle.Tensor.asinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#asinh-name-none)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个链接也为空就可以~


```python
paddle.Tensor.asinh()
```

两者功能一致,均无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [ 无参数 ] torch.Tensor.rsqrt

### [ torch.Tensor.rsqrt](https://pytorch.org/docs/stable/generated/torch.Tensor.rsqrt)

```python
torch.Tensor.rsqrt()
```

### [paddle.Tensor.rsqrt](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#rsqrt-name-none)

```python
paddle.Tensor.rsqrt()
```

两者功能一致,均无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [ 无参数 ]torch.Tensor.rsqrt_

### [torch.Tensor.rsqrt_](https://pytorch.org/docs/stable/generated/torch.Tensor.rsqrt_)

```python
torch.Tensor.rsqrt_()
```

### [paddle.Tensor.rsqrt_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#id15)

```python
paddle.Tensor.rsqrt_()
```

两者功能一致,均无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## [ torch 参数更多 ]torch.Tensor.select
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里分类应该是仅参数名不一致


### [torch.Tensor.select](https://pytorch.org/docs/stable/generated/torch.Tensor.select.html?highlight=select#torch.Tensor.select)

```python
torch.Tensor.select(dim, index)
```

### [paddle.index_select](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#index-select-index-axis-0-name-none)

```python
paddle.Tensor.index_select(index, axis=0, name=None)
```

其中 Pytorch 相⽐ Paddle ⽀持更多其他参数,具体如下:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句话的描述也不太对,应该是 两者功能一致且参数用法一致,仅参数名不一致,具体如下:,辛苦修改一下~


### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| dim | axis | 指定进行运算的轴,仅参数名不同。 |
| index | index | 包含索引下标的 1-D Tensor |
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
## torch.Tensor.sigmoid
### [torch.Tensor.sigmoid](https://pytorch.org/docs/stable/generated/torch.Tensor.sigmoid.html?highlight=torch+sigmoid#torch.Tensor.sigmoid)
## [ 无参数 ]torch.Tensor.sigmoid

### [torch.Tensor.sigmoid](https://pytorch.org/docs/stable/generated/torch.Tensor.sigmoid)
hongtushi marked this conversation as resolved.
Show resolved Hide resolved

```python
torch.Tensor.sigmoid()
```

### [paddle.nn.functional.sigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/sigmoid_cn.html)
### [paddle.Tensor.sigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor/sigmoid_cn.html)
hongtushi marked this conversation as resolved.
Show resolved Hide resolved

```python
paddle.nn.functional.sigmoid(x, name=None)
paddle.Tensor.sigmoid()
```

两者功能一致,参数一致,但 torch 是类成员方式,paddle 是 funtion 调用方式。

### 转写示例

```python
# torch 写法
x.sigmoid()

# paddle 写法
paddle.nn.functional.sigmoid(x)
```
两者功能一致,均无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [ 无参数 ]torch.Tensor.sign

### [torch.Tensor.sign](https://pytorch.org/docs/stable/generated/torch.Tensor.sign)

```python
torch.Tensor.sign()
```

### [paddle.Tensor.sign](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#sign-name-none)

```python
paddle.Tensor.sign()
```

两者功能一致,均无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [ 无参数 ]torch.Tensor.sin

### [torch.Tensor.sin](https://pytorch.org/docs/stable/generated/torch.Tensor.sin)

```python
torch.Tensor.sin()
```

### [paddle.Tensor.sin](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#sin-name-none)

```python
paddle.Tensor.sin()
```

两者功能一致,均无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [ 无参数 ]torch.Tensor.sinh

### [torch.Tensor.sinh](https://pytorch.org/docs/1.13/generated/torch.Tensor.sinh.html?highlight=torch+tensor+sinh#torch.Tensor.sinh)

```python
torch.Tensor.sinh()
```

### [paddle.Tensor.sinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#sinh-name-none)

```python
paddle.Tensor.sinh()
```

两者功能一致,均无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [ 无参数 ]torch.Tensor.slogdet

### [torch.Tensor.slogdet](https://pytorch.org/docs/stable/generated/torch.Tensor.slogdet.html?highlight=torch+tensor+slogdet#torch.Tensor.slogdet)

```python
torch.Tensor.slogdet()
```

### [paddle.Tensor.slogdet](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#slogdet-name-none)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个链接没有slogdet吧,直接为空就可以了~


```python
paddle.Tensor.slogdet()
```

两者功能一致,均无参数。