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

Rename PyTorch-Paddle mapping type #6762

Merged
merged 3 commits into from
Jul 18, 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.BoolTensor
## [ paddle 参数更多 ] torch.BoolTensor

### [torch.BoolTensor](https://pytorch.org/docs/stable/tensors.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.ByteTensor
## [ paddle 参数更多 ] torch.ByteTensor

### [torch.ByteTensor](https://pytorch.org/docs/stable/tensors.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.DoubleTensor
## [ paddle 参数更多 ] torch.DoubleTensor

### [torch.DoubleTensor](https://pytorch.org/docs/stable/tensors.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.FloatTensor
## [ paddle 参数更多 ] torch.FloatTensor

### [torch.FloatTensor](https://pytorch.org/docs/stable/tensors.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.HalfTensor
## [ paddle 参数更多 ] torch.HalfTensor

### [torch.HalfTensor](https://pytorch.org/docs/stable/tensors.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.IntTensor
## [ paddle 参数更多 ] torch.IntTensor

### [torch.IntTensor](https://pytorch.org/docs/stable/tensors.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.LongTensor
## [ paddle 参数更多 ] torch.LongTensor

### [torch.LongTensor](https://pytorch.org/docs/stable/tensors.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.ShortTensor
## [ paddle 参数更多 ] torch.ShortTensor

### [torch.ShortTensor](https://pytorch.org/docs/stable/tensors.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.argwhere
## [ paddle 参数更多 ]torch.Tensor.argwhere
### [torch.Tensor.argwhere](https://pytorch.org/docs/stable/generated/torch.Tensor.argwhere.html#torch.Tensor.argwhere)

```python
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多]torch.Tensor.corrcoef
## [ paddle 参数更多 ]torch.Tensor.corrcoef

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

Expand All @@ -12,7 +12,7 @@ torch.Tensor.corrcoef()
paddle.Tensor.corrcoef(rowvar=True)
```

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

### 参数映射

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多]torch.Tensor.count_nonzero
## [ paddle 参数更多 ]torch.Tensor.count_nonzero
### [torch.Tensor.count_nonzero](https://pytorch.org/docs/stable/generated/torch.Tensor.count_nonzero.html#torch.Tensor.count_nonzero)

```python
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.cov
## [ paddle 参数更多 ]torch.Tensor.cov
### [torch.Tensor.cov](https://pytorch.org/docs/stable/generated/torch.Tensor.cov.html#torch.Tensor.cov)

```python
Expand All @@ -15,7 +15,7 @@ paddle.Tensor.cov(rowvar=True,
name=None)
```

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

### 参数映射

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.cummax
## [ paddle 参数更多 ]torch.Tensor.cummax

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.cummin
## [ paddle 参数更多 ]torch.Tensor.cummin

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.fill_diagonal_
## [ paddle 参数更多 ]torch.Tensor.fill_diagonal_

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.fliplr
## [ paddle 参数更多 ]torch.Tensor.fliplr

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.flipud
## [ paddle 参数更多 ]torch.Tensor.flipud

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.Tensor.item
## [ paddle 参数更多 ] torch.Tensor.item

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.logcumsumexp
## [ paddle 参数更多 ]torch.Tensor.logcumsumexp

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.Tensor.logical_and
## [ paddle 参数更多 ] torch.Tensor.logical_and

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.Tensor.logical_not
## [ paddle 参数更多 ] torch.Tensor.logical_not

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.Tensor.logical_or
## [ paddle 参数更多 ] torch.Tensor.logical_or

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.matmul
## [ paddle 参数更多 ]torch.Tensor.matmul

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

Expand All @@ -12,7 +12,7 @@ torch.Tensor.matmul(other)
paddle.Tensor.matmul(y, transpose_x=False, transpose_y=False, name=None)
```

其中 PyTorch 和 Paddle 功能一致,仅 Paddle 参数更多,具体如下:
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下:

### 参数映射

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.median
## [ paddle 参数更多 ]torch.Tensor.median

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.nanmedian
## [ paddle 参数更多 ]torch.Tensor.nanmedian

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.pinverse
## [ paddle 参数更多 ]torch.Tensor.pinverse
### [torch.Tensor.pinverse](https://pytorch.org/docs/stable/generated/torch.Tensor.pinverse.html#torch.Tensor.pinverse)

```python
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.ravel
## [ paddle 参数更多 ]torch.Tensor.ravel
### [torch.Tensor.ravel](https://pytorch.org/docs/stable/generated/torch.Tensor.ravel.html#torch.Tensor.ravel)

```python
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [仅 paddle 参数更多]torch.Tensor.scatter
## [ 输入参数类型不一致 ]torch.Tensor.scatter
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个看下面的描述是 paddle 参数更多


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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.scatter_add
## [ paddle 参数更多 ]torch.Tensor.scatter_add

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.scatter_add_
## [ paddle 参数更多 ]torch.Tensor.scatter_add_

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.softmax
## [ paddle 参数更多 ]torch.Tensor.softmax
### [torch.Tensor.softmax](https://pytorch.org/docs/stable/generated/torch.Tensor.softmax.html?highlight=softmax#torch.Tensor.softmax)

```python
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.Tensor.take
## [ paddle 参数更多 ] torch.Tensor.take

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多]torch.Tensor.trace
## [ paddle 参数更多 ]torch.Tensor.trace

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多]torch.Tensor.uniform_
## [ paddle 参数更多 ]torch.Tensor.uniform_

### [torch.Tensor.uniform_](https://pytorch.org/docs/stable/generated/torch.Tensor.uniform_.html#torch-tensor-uniform)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多]torch.Tensor.unique_consecutive
## [ paddle 参数更多 ]torch.Tensor.unique_consecutive

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.cuda.BoolTensor
## [ paddle 参数更多 ] torch.cuda.BoolTensor

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.cuda.ByteTensor
## [ paddle 参数更多 ] torch.cuda.ByteTensor

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.cuda.DoubleTensor
## [ paddle 参数更多 ] torch.cuda.DoubleTensor

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.cuda.FloatTensor
## [ paddle 参数更多 ] torch.cuda.FloatTensor

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.cuda.HalfTensor
## [ paddle 参数更多 ] torch.cuda.HalfTensor

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.cuda.IntTensor
## [ paddle 参数更多 ] torch.cuda.IntTensor

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.cuda.LongTensor
## [ paddle 参数更多 ] torch.cuda.LongTensor

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.cuda.ShortTensor
## [ paddle 参数更多 ] torch.cuda.ShortTensor

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [仅参数默认值不一致]torch.cuda.amp.GradScaler
## [ 参数默认值不一致 ]torch.cuda.amp.GradScaler

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多]torch.cuda.amp.autocast
## [ paddle 参数更多 ]torch.cuda.amp.autocast

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.conv_transpose1d
## [ paddle 参数更多 ]torch.nn.functional.conv_transpose1d

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.conv_transpose2d
## [ paddle 参数更多 ]torch.nn.functional.conv_transpose2d

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.conv_transpose3d
## [ paddle 参数更多 ]torch.nn.functional.conv_transpose3d

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PyTorch 参数更多,具体如下:
| ------------- | ------------ | ------------------------------------------------------ |
| input | x | 表示输入的 Tensor 。仅参数名不一致。 |
| kernel_size | kernel_size | 表示核大小。参数完全一致。 |
| output_size | output_size | 表示目标输出尺寸,PyTorch 为可选参数,Paddle 为必选参数,仅参数默认值不一致。PyTorch 的 output_size 与 output_ratio 输入二选一,如不输入 output_size,则必须输入 output_ratio,此时需要转写。转写方式与下文 output_ratio 一致。 |
| output_size | output_size | 表示目标输出尺寸,PyTorch 为可选参数,Paddle 为必选参数,与 PyTorch 默认值不同。PyTorch 的 output_size 与 output_ratio 输入二选一,如不输入 output_size,则必须输入 output_ratio,此时需要转写。转写方式与下文 output_ratio 一致。 |
| output_ratio | - | 表示目标输出比例。Paddle 无此参数,需要转写。 |
| return_indices | return_mask | 表示是否返回最大值索引。仅参数名不一致。 |
| _random_samples | random_u | 表示随机数。PyTorch 以列表形式的 Tensor 方式传入,Paddle 以 float 的方式传入,如果 PyTorch 的多个随机数相同,需要转写,如果 PyTorch 的多个随机数不同,暂无转写方式。 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.group_norm
## [ paddle 参数更多 ]torch.nn.functional.group_norm

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.hardsigmoid
## [ paddle 参数更多 ]torch.nn.functional.hardsigmoid

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

Expand All @@ -12,7 +12,7 @@ torch.nn.functional.hardsigmoid(input, inplace=False)
paddle.nn.functional.hardsigmoid(x, slope=0.1666667, offset=0.5, name=None)
```

其中 PyTorch 和 Paddle 功能一致,仅 paddle 参数更多,具体如下:
其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下:

### 参数映射

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.pad
## [ paddle 参数更多 ]torch.nn.functional.pad

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.pixel_shuffle
## [ paddle 参数更多 ]torch.nn.functional.pixel_shuffle

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.nn.functional.pixel_unshuffle
## [ paddle 参数更多 ] torch.nn.functional.pixel_unshuffle

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.prelu
## [ paddle 参数更多 ]torch.nn.functional.prelu

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 仅参数默认值不一致 ]torch.nn.functional.rrelu_
## [ 参数默认值不一致 ]torch.nn.functional.rrelu_

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ] torch.nn.functional.upsample
## [ paddle 参数更多 ] torch.nn.functional.upsample

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.upsample_bilinear
## [ paddle 参数更多 ]torch.nn.functional.upsample_bilinear

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

Expand Down
Loading