Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 参数默认值不一致 ]torch.alpha_dropout

### [torch.alpha\_dropout](https://pytorch.org/docs/master/generated/torch.nn.functional.alpha_dropout.html)

Copy link
Collaborator

@zhwesky2010 zhwesky2010 Oct 13, 2025

Choose a reason for hiding this comment

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

看大部分的改动都是这个空行,这个地方也不用改。

这里是自动生成刷新,还是手动改的。

目前有可以自动生成的没,第2类的生成有可行性没

Copy link
Contributor Author

Choose a reason for hiding this comment

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

有些文件格式不统一,利用脚本对文件进行统一处理了一下,会导致有些文件有一些冗余处理,但是操作应该不可逆

```python
torch.alpha_dropout(input, p=0.5, train=False)
```

### [paddle.nn.functional.alpha\_dropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/alpha_dropout_cn.html#alpha-dropout)

```python
paddle.nn.functional.alpha_dropout(x, p=0.5, training=True, name=None)
```

其中 PyTorch 和 Paddle 功能一致,参数默认值不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------- | ------------ | -- |
| input | x | 输入的多维 Tensor,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
## [ 参数默认值不一致 ]torch.cuda.amp.GradScaler

### [torch.cuda.amp.GradScaler](https://pytorch.org/docs/stable/amp.html#torch.cuda.amp.GradScaler)

```python
torch.cuda.amp.GradScaler(init_scale=65536.0, growth_factor=2.0, backoff_factor=0.5, growth_interval=2000, enabled=True)
```

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

```python
paddle.amp.GradScaler(enable=True, init_loss_scaling=65536.0, incr_ratio=2.0, decr_ratio=0.5, incr_every_n_steps=2000, decr_every_n_nan_or_inf=2, use_dynamic_loss_scaling=True)
```

其中 Paddle 相比 PyTorch 支持更多其他参数且参数默认值不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| --------------- | ------------------------ |-----------------------------------------------------------------------------|
| init_scale | init_loss_scaling | 初始 loss scaling 因子。Paddle 与 PyTorch 默认值不同,Paddle 应设置为 65536.0。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
## [ 参数默认值不一致 ]torch.linalg.diagonal
### [torch.linalg.diagonal](https://pytorch.org/docs/stable/generated/torch.linalg.diagonal.html#torch.linalg.diagonal)

```python
torch.linalg.diagonal(A, *, offset=0, dim1=-2, dim2=-1)
```

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

```python
paddle.diagonal(x,
offset=0,
Expand All @@ -18,7 +16,6 @@ paddle.diagonal(x,
两者功能一致且参数用法一致,参数默认值不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| <font color='red'> A </font> | <font color='red'> x </font> | 表示输入的 Tensor ,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 参数默认值不一致 ]torch.nn.functional.rrelu_

### [torch.nn.functional.rrelu\_](https://pytorch.org/docs/stable/generated/torch.nn.functional.rrelu_.html)

```python
torch.nn.functional.rrelu_(input, lower=1./8, upper=1./3, training=False)
```

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

```python
paddle.nn.functional.rrelu(x, lower=1./8., upper=1./3., training=True, name=None)
```

其中 PyTorch 和 Paddle 功能基本一致,前者会在不变更变量内存地址的情况下,直接改变变量的值,一般对网络训练结果影响不大。参数名与参数默认值不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| -------- | ------------ | -- |
| input | x | 输入的 Tensor,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 参数默认值不一致 ]torch.nn.functional.threshold_

### [torch.nn.functional.threshold_](https://pytorch.org/docs/stable/generated/torch.nn.functional.threshold_.html#torch.nn.functional.threshold_)

```python
torch.nn.functional.threshold_(input, threshold, value)
```

### [paddle.nn.functional.thresholded_relu_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/thresholded_relu__cn.html#thresholded-relu)

```python
paddle.nn.functional.thresholded_relu_(x, threshold=1.0, value=0.0, name=None)
```

两者功能一致,但参数名称与参数默认值不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| --------- | ------------ | --------------------------------------------------------------------------------------------------------------- |
| input | x | 输入的 Tensor,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 参数默认值不一致 ]torch.rrelu

### [torch.rrelu](https://pytorch.org/docs/stable/generated/torch.nn.functional.rrelu.html#torch.nn.functional.rrelu)

```python
torch.rrelu(input, lower=1./8, upper=1./3, training=False)
```

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

```python
paddle.nn.functional.rrelu(x, lower=1./8, upper=1./3, training=True, name=None)
```

其中 PyTorch 和 Paddle 功能一致,参数名与参数默认值不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| -------- | ------------ | ----------------------------------------- |
| input | x | 输入的 Tensor,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.addmm

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

```python
torch.Tensor.addmm(mat1, mat2, *, beta=1, alpha=1)
```

### [paddle.Tensor.addmm]()

```python
paddle.Tensor.addmm(x, y, alpha=1.0, beta=1.0)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| -------- | ------------ | -------------------------------- |
| mat1 | x | 表示输入的 Tensor,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.addmm_

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

```python
torch.Tensor.addmm_(mat1, mat2, *, beta=1, alpha=1)
```

### [paddle.Tensor.addmm_]()

```python
paddle.Tensor.addmm_(x, y, alpha=1.0, beta=1.0)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| -------- | ------------ | -------------------------------- |
| mat1 | x | 表示输入的 Tensor,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
## [ 仅参数名不一致 ]torch.Tensor.as_strided
### [torch.Tensor.as_strided](https://pytorch.org/docs/stable/generated/torch.Tensor.as_strided.html?highlight=as_strided#torch.Tensor.as_strided)

```python
torch.Tensor.as_strided(size,
stride,
storage_offset=None)
```

### [paddle.Tensor.as_strided](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#as-strided-x-shape-stride-offset-0-name-none)

```python
paddle.Tensor.as_strided(shape,
stride,
Expand All @@ -18,7 +16,6 @@ paddle.Tensor.as_strided(shape,

两者功能一致且参数用法一致,仅参数名不一致,具体如下:
### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| size | shape | 表示输出 Tensor 的维度, 仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.atan2

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

```python
torch.Tensor.atan2(other)
```

### [paddle.Tensor.atan2](https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/Tensor_en.html)

```python
paddle.Tensor.atan2(y, name=None)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| --------- | ------------ | --------------------------------- |
| other | y | 表示输入的 Tensor ,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.baddbmm

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

```python
torch.Tensor.baddbmm(batch1, batch2, *, beta=1, alpha=1)
```

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

```python
paddle.Tensor.baddbmm(x, y, beta=1, alpha=1, name=None)
```

两者功能一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------- | ------------ | ------------------------------------------------------------------------------------------ |
| batch1 | x | 表示输入的第一个 Tensor ,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.baddbmm_

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

```python
torch.Tensor.baddbmm_(batch1, batch2, *, beta=1, alpha=1)
```

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

```python
paddle.Tensor.baddbmm_(x, y, beta=1, alpha=1, name=None)
```

两者功能一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------- | ------------ | ------------------------------------------------------------------------------------------ |
| batch1 | x | 表示输入的第一个 Tensor ,仅参数名不一致。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.bitwise_and

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

```python
torch.Tensor.bitwise_and(other)
```

### [paddle.Tensor.bitwise_and]()

```python
paddle.Tensor.bitwise_and(y)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| other | y | 表示输入的 Tensor ,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.bitwise_and_

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

```python
torch.Tensor.bitwise_and_(other)
```

### [paddle.Tensor.bitwise_and_]()

```python
paddle.Tensor.bitwise_and_(y)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| other | y | 表示输入的 Tensor ,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.bitwise_or

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

```python
torch.Tensor.bitwise_or(other)
```

### [paddle.Tensor.bitwise_or]()

```python
paddle.Tensor.bitwise_or(y)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| other | y | 表示输入的 Tensor ,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.bitwise_xor

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

```python
torch.Tensor.bitwise_xor(other)
```

### [paddle.Tensor.bitwise_xor]()

```python
paddle.Tensor.bitwise_xor(y)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| other | y | 表示输入的 Tensor ,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.bitwise_xor_

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

```python
torch.Tensor.bitwise_xor_(other)
```

### [paddle.Tensor.bitwise_xor_]()

```python
paddle.Tensor.bitwise_xor_(y)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| other | y | 表示输入的 Tensor ,仅参数名不一致。 |
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
## [ 仅参数名不一致 ]torch.Tensor.broadcast_to

### [torch.Tensor.broadcast\_to](https://pytorch.org/docs/stable/generated/torch.Tensor.broadcast_to.html)

```python
torch.Tensor.broadcast_to(size)
```

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

```python
paddle.Tensor.broadcast_to(shape, name=None)
```

其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------- | ------------ | -- |
| size | shape | 给定输入 x 扩展后的形状,仅参数名不一致。 |
Loading