Skip to content

【映射文档】在映射主目录中补全已有文档的条目 #6656

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

Merged
merged 4 commits into from
May 27, 2024
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
1 change: 1 addition & 0 deletions docs/guides/model_convert/convert_from_pytorch/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
docs_mappings.json
pytorch_api_mapping_cn.tmp.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
## [ 仅参数名不一致 ]torch.nn.functional.softmax
## [ torch 参数更多 ]torch.nn.functional.softmax

### [torch.nn.functional.softmax](https://pytorch.org/docs/stable/generated/torch.nn.functional.softmax.html?highlight=softmax#torch.nn.functional.softmax)
### [torch.nn.functional.softmax](https://pytorch.org/docs/stable/generated/torch.nn.functional.softmax.html#torch.nn.functional.softmax)

```python
torch.nn.functional.softmax(input,
dim=None,
dtype=None)
torch.nn.functional.softmax(input, dim=None, _stacklevel=3, dtype=None)
```

### [paddle.nn.functional.softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softmax_cn.html)
### [paddle.nn.functional.softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softmax_cn.html#softmax)

```python
paddle.nn.functional.softmax(x,
axis=- 1,
dtype=None,
name=None)
paddle.nn.functional.softmax(x, axis=-1, dtype=None, name=None)
```

两者功能一致,仅参数名不一致,具体如下:
PyTorch 相比 Paddle 支持更多其他参数,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 表示输入 Tensor ,仅参数名不一致。 |
| dim | axis | 表示对输入 Tensor 运算的轴 ,仅参数名不一致。 |
| dtype | dtype | 表示输入 Tensor 的数据类型 。 |
| PyTorch | PaddlePaddle | 备注 |
| --------- | -------------- | ----------------------------------------------------- |
| input | x | 表示输入张量,仅参数名不一致。 |
| dim | axis | 表示对输入 Tensor 进行运算的轴,仅参数名不一致。 |
| dtype | dtype | 表示返回张量所需的数据类型。 |
| _stacklevel | - | Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 |

This file was deleted.

Loading