Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.argwhere
## [ 仅 API 调用方式不一致 ]torch.Tensor.argwhere
### [torch.Tensor.argwhere](https://pytorch.org/docs/stable/generated/torch.Tensor.argwhere.html#torch.Tensor.argwhere)
```python
torch.Tensor.argwhere()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ torch 参数更多 ]torch.Tensor.bernoulli
## [ 仅 API 调用方式不一致 ]torch.Tensor.bernoulli
### [torch.Tensor.bernoulli](https://pytorch.org/docs/stable/generated/torch.Tensor.bernoulli.html#torch.Tensor.bernoulli)
```python
torch.Tensor.bernoulli(p=None, *, generator=None)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.Tensor.pinverse
## [ 仅 API 调用方式不一致 ]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 @@
## [ 仅参数名不一致 ]torch.autograd.function.FunctionCtx.mark_non_differentiable
## [ 仅 API 调用方式不一致 ]torch.autograd.function.FunctionCtx.mark_non_differentiable
### [torch.autograd.function.FunctionCtx.mark_non_differentiable](https://pytorch.org/docs/stable/generated/torch.autograd.function.FunctionCtx.mark_non_differentiable.html#torch.autograd.function.FunctionCtx.mark_non_differentiable)
```python
torch.autograd.function.FunctionCtx.mark_non_differentiable(*args)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 返回参数类型不一致 ]torch.cuda.get_rng_state_all
## [ 仅 API 调用方式不一致 ]torch.cuda.get_rng_state_all
### [torch.cuda.get_rng_state_all](https://pytorch.org/docs/stable/generated/torch.cuda.get_rng_state_all.html#torch.cuda.get_rng_state_all)
```python
torch.cuda.get_rng_state_all()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 返回参数类型不一致 ]torch.cuda.manual_seed
## [ 仅 API 调用方式不一致 ]torch.cuda.manual_seed
### [torch.cuda.manual_seed](https://pytorch.org/docs/stable/generated/torch.cuda.manual_seed.html#torch.cuda.manual_seed)
```python
torch.cuda.manual_seed(seed)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ torch 参数更多 ]torch.distributed.ReduceOp
## [ 仅 API 调用方式不一致 ]torch.distributed.ReduceOp
### [torch.distributed.ReduceOp](https://pytorch.org/docs/stable/distributed.html?highlight=torch+distributed+reduceop#torch.distributed.ReduceOp)
```python
torch.distributed.ReduceOp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 返回参数类型不一致 ]torch.max
## [ 仅 API 调用方式不一致 ]torch.max
输入一个 Tensor 对应 paddle.max,输入两个 Tensor 对应 paddle.maximum,因此有两组差异分析,分别如下:

-------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ torch 参数更多 ]torch.median
## [ 仅 API 调用方式不一致 ]torch.median
### [torch.median](https://pytorch.org/docs/stable/generated/torch.median.html?highlight=median#torch.median)
```python
torch.median(input,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 返回参数类型不一致 ]torch.min
## [ 仅 API 调用方式不一致 ]torch.min
输入一个 Tensor 对应 paddle.min,输入两个 Tensor 对应 paddle.minimum,因此有两组差异分析,分别如下:

--------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ torch 参数更多 ]torch.nanmedian
## [ 仅 API 调用方式不一致 ]torch.nanmedian
### [torch.nanmedian](https://pytorch.org/docs/stable/generated/torch.nanmedian.html?highlight=nanmedian#torch.nanmedian)
```python
torch.nanmedian(input,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.AdaptiveAvgPool2d
## [ 仅 API 调用方式不一致 ]torch.nn.AdaptiveAvgPool2d
### [torch.nn.AdaptiveAvgPool2d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveAvgPool2d.html)
```python
torch.nn.AdaptiveAvgPool2d(output_size)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.AdaptiveAvgPool3d
## [ 仅 API 调用方式不一致 ]torch.nn.AdaptiveAvgPool3d
### [torch.nn.AdaptiveAvgPool3d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveAvgPool3d.html)
```python
torch.nn.AdaptiveAvgPool3d(output_size)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.MaxUnpool1d
## [ 仅 API 调用方式不一致 ]torch.nn.MaxUnpool1d
### [torch.nn.MaxUnpool1d](https://pytorch.org/docs/stable/generated/torch.nn.MaxUnpool1d.html?highlight=maxunpool1d#torch.nn.MaxUnpool1d)
```python
torch.nn.MaxUnpool1d(kernel_size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.MaxUnpool2d
## [ 仅 API 调用方式不一致 ]torch.nn.MaxUnpool2d
### [torch.nn.MaxUnpool2d](https://pytorch.org/docs/stable/generated/torch.nn.MaxUnpool2d.html?highlight=maxunpool2d#torch.nn.MaxUnpool2d)
```python
torch.nn.MaxUnpool2d(kernel_size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.MaxUnpool3d
## [ 仅 API 调用方式不一致 ]torch.nn.MaxUnpool3d
### [torch.nn.MaxUnpool3d](https://pytorch.org/docs/stable/generated/torch.nn.MaxUnpool3d.html?highlight=maxunpool3d#torch.nn.MaxUnpool3d)
```python
torch.nn.MaxUnpool3d(kernel_size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.Module
## [ 仅 API 调用方式不一致 ]torch.nn.Module

### [torch.nn.Module](https://pytorch.org/docs/stable/generated/torch.nn.Module.html?highlight=torch+nn+module#torch.nn.Module)
```python
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.Module.modules
## [ 仅 API 调用方式不一致 ]torch.nn.Module.modules
### [torch.nn.Module.modules](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.modules)
```python
torch.nn.Module.modules()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 仅参数名不一致 ]torch.nn.Unfold
## [ 仅 API 调用方式不一致 ]torch.nn.Unfold
### [torch.nn.Unfold](https://pytorch.org/docs/stable/generated/torch.nn.Unfold.html?highlight=nn+unfold#torch.nn.Unfold)
```python
torch.nn.Unfold(kernel_size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.UpsamplingBilinear2d
## [ 仅 API 调用方式不一致 ]torch.nn.UpsamplingBilinear2d
### [torch.nn.UpsamplingBilinear2d](https://pytorch.org/docs/stable/generated/torch.nn.UpsamplingBilinear2d.html?highlight=upsamplingbilinear2d#torch.nn.UpsamplingBilinear2d)
```python
torch.nn.UpsamplingBilinear2d(size=None, scale_factor=None)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.UpsamplingNearest2d
## [ 仅 API 调用方式不一致 ]torch.nn.UpsamplingNearest2d
### [torch.nn.UpsamplingNearest2d](https://pytorch.org/docs/stable/generated/torch.nn.UpsamplingNearest2d.html?highlight=upsampl#torch.nn.UpsamplingNearest2d)
```python
torch.nn.UpsamplingNearest2d(size=None, scale_factor=None)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.ZeroPad2d
## [ 仅 API 调用方式不一致 ]torch.nn.ZeroPad2d

### [torch.nn.ZeroPad2d](https://pytorch.org/docs/stable/generated/torch.nn.ZeroPad2d.html?highlight=zeropad#torch.nn.ZeroPad2d)
```python
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torch.nn.functional.pad
## [ 仅 API 调用方式不一致 ]torch.nn.functional.pad
### [torch.nn.functional.pad](https://pytorch.org/docs/stable/generated/torch.nn.functional.pad.html)
```python
torch.nn.functional.pad(input,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ torch 参数更多 ]torch.nn.functional.softmax
## [ 仅 API 调用方式不一致 ]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, _stacklevel=3, dtype=None)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ torch 参数更多 ]torch.optim.Optimizer.step
## [ 仅 API 调用方式不一致 ]torch.optim.Optimizer.step
### [torch.optim.Optimizer.step](https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.step.html#torch-optim-optimizer-step)
```python
torch.optim.Optimizer.step(closure)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 返回参数类型不一致 ]torch.sort
## [ 仅 API 调用方式不一致 ]torch.sort
### [torch.sort](https://pytorch.org/docs/stable/generated/torch.sort.html?highlight=sort#torch.sort)
```python
torch.sort(input,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 输入参数用法不一致 ]torch.split
## [ 仅 API 调用方式不一致 ]torch.split
### [torch.split](https://pytorch.org/docs/stable/generated/torch.split.html?highlight=torch%20split#torch.split)
```python
torch.split(tensor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 返回参数类型不一致 ]torch.utils.data.default_collate
## [ 仅 API 调用方式不一致 ]torch.utils.data.default_collate
### [torch.utils.data.default_collate](https://pytorch.org/docs/stable/data.html?highlight=default_collate#torch.utils.data.default_collate)
```python
torch.utils.data.default_collate(batch)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torchvision.transforms.CenterCrop
## [ 仅 API 调用方式不一致 ]torchvision.transforms.CenterCrop
### [torchvision.transforms.CenterCrop](https://pytorch.org/vision/main/generated/torchvision.transforms.CenterCrop.html)
```python
torchvision.transforms.CenterCrop(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torchvision.transforms.ColorJitter
## [ 仅 API 调用方式不一致 ]torchvision.transforms.ColorJitter
### [torchvision.transforms.ColorJitter](https://pytorch.org/vision/main/generated/torchvision.transforms.ColorJitter.html)
```python
torchvision.transforms.ColorJitter(brightness: Union[float, Tuple[float, float]] = 0, contrast: Union[float, Tuple[float, float]] = 0, saturation: Union[float, Tuple[float, float]] = 0, hue: Union[float, Tuple[float, float]] = 0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torchvision.transforms.Grayscale
## [ 仅 API 调用方式不一致 ]torchvision.transforms.Grayscale

### [torchvision.transforms.Grayscale](https://pytorch.org/vision/main/generated/torchvision.transforms.Grayscale.html)
```python
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torchvision.transforms.Pad
## [ 仅 API 调用方式不一致 ]torchvision.transforms.Pad

### [torchvision.transforms.Pad](https://pytorch.org/vision/main/generated/torchvision.transforms.Pad.html)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 输入参数类型不一致 ]torchvision.transforms.RandomAffine
## [ 仅 API 调用方式不一致 ]torchvision.transforms.RandomAffine
### [torchvision.transforms.RandomAffine](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomAffine.html)
```python
torchvision.transforms.RandomAffine(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torchvision.transforms.RandomCrop
## [ 仅 API 调用方式不一致 ]torchvision.transforms.RandomCrop
### [torchvision.transforms.RandomCrop](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomCrop.html)
```python
torchvision.transforms.RandomCrop(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 输入参数类型不一致 ]torchvision.transforms.RandomRotation
## [ 仅 API 调用方式不一致 ]torchvision.transforms.RandomRotation
### [torchvision.transforms.RandomRotation](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomRotation.html)
```python
torchvision.transforms.RandomRotation(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torchvision.transforms.ToTensor
## [ 仅 API 调用方式不一致 ]torchvision.transforms.ToTensor
### [torchvision.transforms.ToTensor](https://pytorch.org/vision/main/generated/torchvision.transforms.ToTensor.html?highlight=totensor#torchvision.transforms.ToTensor)
```python
torchvision.transforms.ToTensor()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 输入参数类型不一致 ]torchvision.transforms.functional.affine
## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.affine
### [torchvision.transforms.functional.affine](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.affine.html)
```python
torchvision.transforms.functional.affine(img: Tensor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 输入参数类型不一致 ]torchvision.transforms.functional.perspective
## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.perspective
### [torchvision.transforms.functional.perspective](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.perspective.html#perspective)
```python
torchvision.transforms.functional.perspective(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 输入参数类型不一致 ]torchvision.transforms.functional.rotate
## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.rotate
### [torchvision.transforms.functional.rotate](https://pytorch.org/vision/stable/generated/torchvision.transforms.functional.rotate.html)
```python
torchvision.transforms.functional.rotate(img: Tensor, angle: float, interpolation: InterpolationMode = InterpolationMode.NEAREST, expand: bool = False, center: Optional[List[int]] = None, fill: Optional[List[float]] = None)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ paddle 参数更多 ]torchvision.transforms.functional.to_tensor
## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.to_tensor
### [torchvision.transforms.functional.to_tensor](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.to_tensor.html)
```python
torchvision.transforms.functional.to_tensor(pic: Union[PIL.Image.Image, numpy.ndarray])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [ 仅参数名不一致 ]transformers.StoppingCriteriaList
## [ 仅 API 调用方式不一致 ]transformers.StoppingCriteriaList
### [transformers.StoppingCriteriaList](https://github.com/huggingface/transformers/blob/d625294d79341662784495551abdf45e6cb9372f/src/transformers/generation/stopping_criteria.py#L503)
```python
transformers.StoppingCriteriaList(input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def generate_api_alias_table(
# 遍历api_alias_data,为每个别名映射生成表格行
for torch_api, torch_api_alias in api_alias_data.items():
# 检查API是否已经在前面的类别中处理过
if torch_api in existing_apis or torch_api_alias in existing_apis:
if torch_api in existing_apis:
continue

# 在docs_mapping中查找torch_api_alias对应的Paddle API
Expand Down Expand Up @@ -309,7 +309,6 @@ def generate_api_alias_table(
used_apis.add(torch_api)
used_apis.add(torch_api_alias)
existing_apis.add(torch_api)
existing_apis.add(torch_api_alias)

# 生成Markdown表格字符串
table_lines = TABLE_HEADER_LINES.copy()
Expand Down Expand Up @@ -370,6 +369,7 @@ def generate_no_implement_table(
)

# 检查API是否已经在前面的类别中处理过
torch_api = torch_api.replace(r"\_", "_")
if torch_api in existing_apis:
continue

Expand Down Expand Up @@ -411,7 +411,7 @@ def generate_no_implement_table(
# 生成Markdown表格字符串
table_lines = TABLE_HEADER_LINES.copy()

for idx, (_, col2, col3, mapping_category, remark) in enumerate(
for idx, (torch_api, col2, col3, mapping_category, remark) in enumerate(
rows, start=1
):
table_lines.append(
Expand Down Expand Up @@ -449,6 +449,7 @@ def update_mapping_table(
if api_name in existing_apis:
continue

existing_apis.add(api_name)
mapping_info = api_mapping_dict.get(api_name, {})
dst_api = mapping_info.get("dst_api", "-")

Expand Down