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. 263/264 #6026

Merged
merged 3 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## [torch 参数更多]torch.special.erfinv

### [torch.special.erfinv](https://pytorch.org/docs/stable/special.html#torch.special.erfinv)

```python
torch.special.erfinv(input, *, out=None)
```

### [paddle.erfinv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/erfinv_cn.html)

```python
paddle.erfinv(x, name=None)
```

其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------- | ------------ | -------------------------------------------------- |
| input | x | 表示输入的 Tensor,仅参数名不一致。 |
| out | - | 表示输出的 Tensor,Paddle 无此参数,需要进行转写。 |

### 转写示例

#### out:指定输出

```python
# Pytorch 写法
torch.special.erfinv(x, out=y)

# Paddle 写法
paddle.assign(paddle.erfinv(x), y)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## [torch 参数更多]torch.special.logit

### [torch.special.logit](https://pytorch.org/docs/stable/special.html#torch.special.logit)

```python
torch.special.logit(input, eps=None, *, out=None)
```

### [paddle.logit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/logit_cn.html)

```python
paddle.logit(x, eps=None, name=None)
```

其中 Pytorch 相比 Paddle 支持更多其他参数,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------- | ------------ | -------------------------------------------------- |
| input | x | 输入的 Tensor,仅参数名不一致。 |
| eps | eps | 传入该参数后可将 x 的范围控制在 [eps,1−eps]。 |
Copy link
Contributor

Choose a reason for hiding this comment

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

这个eps参数的备注是不是将x改为“输入Tensor”是不是更好一点

Copy link
Contributor Author

Choose a reason for hiding this comment

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

| out | - | 表示输出的 Tensor,Paddle 无此参数,需要进行转写。 |

### 转写示例

#### out:指定输出

```python
# Pytorch 写法
torch.special.logit(x, out=y)

# Paddle 写法
paddle.assign(paddle.logit(x), y)
```