Skip to content

Commit 4be8fb4

Browse files
authored
【映射文档】在映射主目录中补全已有文档的条目 (#6656)
* fix 5 inconsistent api items * update validator * update pytorch_api_mapping_cn.md * pre-commit
1 parent 0a895a7 commit 4be8fb4

File tree

6 files changed

+983
-629
lines changed

6 files changed

+983
-629
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
docs_mappings.json
2+
pytorch_api_mapping_cn.tmp.md
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
1-
## [ 仅参数名不一致 ]torch.nn.functional.softmax
1+
## [ torch 参数更多 ]torch.nn.functional.softmax
22

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

55
```python
6-
torch.nn.functional.softmax(input,
7-
dim=None,
8-
dtype=None)
6+
torch.nn.functional.softmax(input, dim=None, _stacklevel=3, dtype=None)
97
```
108

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

1311
```python
14-
paddle.nn.functional.softmax(x,
15-
axis=- 1,
16-
dtype=None,
17-
name=None)
12+
paddle.nn.functional.softmax(x, axis=-1, dtype=None, name=None)
1813
```
1914

20-
两者功能一致,仅参数名不一致,具体如下:
15+
PyTorch 相比 Paddle 支持更多其他参数,具体如下:
16+
2117
### 参数映射
2218

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

docs/guides/model_convert/convert_from_pytorch/api_difference/nn/torch.nn.functional.softmax.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)