Skip to content

Commit 63362b7

Browse files
authored
update api convert list (PaddlePaddle#5812)
* update api convert list * fix detail style * fix detail style
1 parent d60a9ce commit 63362b7

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.swapdims.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [ 参数用法不⼀致 ] torch.swapdims
1+
## [ 参数不⼀致 ] torch.swapdims
22

33
### [torch.swapdims](https://pytorch.org/docs/master/generated/torch.swapdims.html#torch.swapdims)
44

docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,20 @@
190190
| 160 | [torch.nansum](https://pytorch.org/docs/stable/generated/torch.nansum.html?highlight=nansum#torch.nansum) | paddle.nansum | 功能一致,仅参数命名不一致 |
191191
| 161 | [torch.meshgrid](https://pytorch.org/docs/stable/generated/torch.meshgrid.html?highlight=meshgrid#torch.meshgrid) | [paddle.meshgrid](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/meshgrid_cn.html#meshgrid) | 功能一致,torch 参数更多 [差异对比](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.meshgrid.md) |
192192
| 162 | [torch.sigmoid](https://pytorch.org/docs/stable/generated/torch.sigmoid.html?highlight=sigmoid#torch.sigmoid) | [paddle.nn.functional.sigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/sigmoid_cn.html#sigmoid) | 功能一致,torch 参数更多 [差异对比](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.sigmoid.md) |
193+
| 163 | [torch.addcdiv](https://pytorch.org/docs/master/generated/torch.addcdiv.html#torch.addcdiv) | | [组合替代实现](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.addcdiv.md) |
194+
| 164 | [torch.addcmul](https://pytorch.org/docs/master/generated/torch.addcmul.html#torch.addcmul) | | [组合替代实现](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.addcmul.md) |
195+
| 165 | [torch.get_rng_state](https://pytorch.org/docs/master/generated/torch.get_rng_state.html#torch.get_rng_state) | [paddle.get_cuda_rng_state](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/get_cuda_rng_state_cn.html#get-cuda-rng-state) | 功能一致,参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.get_rng_state.md) |
196+
| 166 | [torch.heaviside](https://pytorch.org/docs/master/generated/torch.heaviside.html#torch.heaviside) | [paddle.heaviside](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/heaviside_cn.html#heaviside) | 功能一致,torch 参数更多, [差异对比](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.heaviside.md) |
197+
| 167 | [torch.is_nonzero](https://pytorch.org/docs/master/generated/torch.is_nonzero.html#torch.is_nonzero) | | [组合替代实现](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.is_nonzero.md) |
198+
| 168 | [torch.polar](https://pytorch.org/docs/master/generated/torch.polar.html#torch.polar) | | [组合替代实现](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.polar.md) |
199+
| 169 | [torch.rand_like](https://pytorch.org/docs/master/generated/torch.rand_like.html#torch.rand_like) | | [组合替代实现](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.rand_like.md) |
200+
| 170 | [torch.row_stack](https://pytorch.org/docs/master/generated/torch.row_stack.html#torch.row_stack) | | [组合替代实现](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.row_stack.md) |
201+
| 171 | [torch.seed](https://pytorch.org/docs/master/generated/torch.seed.html#torch.seed) | | [组合替代实现](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.seed.md) |
202+
| 172 | [torch.set_printoptions](https://pytorch.org/docs/master/generated/torch.set_printoptions.html#torch.set_printoptions) | [paddle.set_printoptions](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/set_printoptions_cn.html#set-printoptions) | 功能一致,torch 参数更多, [差异对比](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.set_printoptions.md) |
203+
| 173 | [torch.set_rng_state](https://pytorch.org/docs/master/generated/torch.set_rng_state.html#torch.set_rng_state) | [paddle.set_cuda_rng_state](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/set_cuda_rng_state_cn.html#set-cuda-rng-state) | 功能一致,参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.set_rng_state.md) |
204+
| 174 | [torch.swapaxes](https://pytorch.org/docs/master/generated/torch.swapaxes.html#torch.swapaxes) | [paddle.transpose](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/transpose_cn.html#transpose) | 功能一致,参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.swapaxes.md) |
205+
| 175 | [torch.swapdims](https://pytorch.org/docs/master/generated/torch.swapdims.html#torch.swapdims) | [paddle.transpose](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/transpose_cn.html#transpose) | 功能一致,参数不一致, [差异对比](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.swapdims.md) |
206+
| 176 | [torch.vstack](https://pytorch.org/docs/master/generated/torch.vstack.html#torch.vstack) | | [组合替代实现](https://github.com/PaddlePaddle/docs/blob/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.vstack.md) |
193207

194208
***持续更新...***
195209

@@ -436,8 +450,7 @@
436450
| 82 | [torch.Tensor.frac](https://pytorch.org/docs/stable/generated/torch.Tensor.frac.html?highlight=frac#torch.Tensor.frac) | [paddle.Tensor.frac](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#frac-name-none) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.frac.md) |
437451
| 83 | [torch.Tensor.gather](https://pytorch.org/docs/stable/generated/torch.Tensor.gather.html?highlight=gather#torch.Tensor.gather) | [paddle.Tensor.take_along_axis](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#take-along-axis-arr-index-axis) | 功能一致, 仅参数名不一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.gather.md) |
438452
| 84 | [torch.Tensor.logcumsumexp](https://pytorch.org/docs/stable/generated/torch.Tensor.logcumsumexp.html?highlight=logcumsumexp#torch.Tensor.logcumsumexp) | [paddle.Tensor.logcumsumexp](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/logcumsumexp_cn.html#logcumsumexp) | 功能一致, 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.logcumsumexp.md) |
439-
| 85 | [torch.Tensor.diagflat](https://pytorch.org/docs/stable/generated/torch.Tensor.diagflat.html?highlight=diagflat#torch.Tensor.diagflat) | [paddle.diagflat](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/diagflat_cn.html#diagflat)
440-
| 功能一致,参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.diagflat.md) |
453+
| 85 | [torch.Tensor.diagflat](https://pytorch.org/docs/stable/generated/torch.Tensor.diagflat.html?highlight=diagflat#torch.Tensor.diagflat) | [paddle.diagflat](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/diagflat_cn.html#diagflat) | 功能一致,参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.diagflat.md) |
441454
| 86 | [torch.Tensor.nanquantile](https://pytorch.org/docs/stable/generated/torch.nanquantile.html#torch.nanquantile) | [paddle.Tensor.nanquantile](https://github.com/PaddlePaddle/Paddle/pull/41343) | 功能一致, torch 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.nanquantile.md) |
442455
| 87 | [torch.Tensor.negative](https://pytorch.org/docs/stable/generated/torch.negative.html#torch.negative) | [paddle.Tensor.neg](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/neg_cn.html#cn-api-paddle-neg) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.negative.md) |
443456
| 88 | [torch.Tensor.nelement](https://pytorch.org/docs/stable/generated/torch.Tensor.nelement.html?highlight=nelement#torch.Tensor.nelement) | [paddle.Tensor.size](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/fluid/layers/size_cn.html#cn-api-fluid-layers-size) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.nelement.md) |
@@ -458,6 +471,16 @@
458471
| 103 | [torch.Tensor.sin](https://pytorch.org/docs/stable/generated/torch.Tensor.sin) | [paddle.Tensor.sin](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#sin-name-none) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.sin.md) |
459472
| 104 | [torch.Tensor.sinh](https://pytorch.org/docs/1.13/generated/torch.Tensor.sinh.html?highlight=torch+tensor+sinh#torch.Tensor.sinh) | [paddle.Tensor.sinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#sinh-name-none) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.sinh.md) |
460473
| 105 | [torch.Tensor.slogdet](https://pytorch.org/docs/stable/generated/torch.Tensor.slogdet.html?highlight=torch+tensor+slogdet#torch.Tensor.slogdet) | [paddle.linalg.slogdet](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/slogdet_cn.html) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.slogdet.md) |
474+
| 106 | [torch.Tensor.mul](https://pytorch.org/docs/1.13/generated/torch.Tensor.mul.html) | [paddle.Tensor.multiply](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#multiply-y-axis-1-name-none) | 功能一致, 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.mul.md) |
475+
| 107 | [torch.Tensor.mul_](https://pytorch.org/docs/1.13/generated/torch.Tensor.mul_.html?highlight=mul_) | [paddle.Tensor.scale_](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#id16) | 功能一致, 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.mul_.md) |
476+
| 108 | [torch.Tensor.multiply](https://pytorch.org/docs/1.13/generated/torch.Tensor.multiply.html) | [paddle.Tensor.multiply](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#multiply-y-axis-1-name-none) | 功能一致, 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.multiply.md) |
477+
| 109 | [torch.Tensor.multiply_](https://pytorch.org/docs/1.13/generated/torch.Tensor.multiply_.html?highlight=multiply#torch.Tensor.multiply_) | [paddle.Tensor.scale_](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#id16) | 功能一致, 仅 paddle 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.multiply_.md) |
478+
| 110 | [torch.Tensor.mv](https://pytorch.org/docs/1.13/generated/torch.Tensor.mv.html) | [paddle.Tensor.mv](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#mv-vec-name-none) | 功能一致, 参数完全一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.mv.md) |
479+
| 111 | [torch.Tensor.nansum](https://pytorch.org/docs/1.13/generated/torch.Tensor.nansum.html?highlight=nansum#torch.Tensor.nansum) | [paddle.Tensor.nansum]() | 功能一致, 仅参数名不一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.nansum.md) |
480+
| 112 | [torch.Tensor.ndimension](https://pytorch.org/docs/1.13/generated/torch.Tensor.ndimension.html?highlight=ndimension#torch.Tensor.ndimension) | [paddle.Tensor.ndimension](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#ndimension) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.ndimension.md) |
481+
| 113 | [torch.Tensor.ne](https://pytorch.org/docs/1.13/generated/torch.Tensor.ne.html?highlight=ne) | [paddle.Tensor.not_equal](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#not-equal-y-name-none) | 功能一致, 仅参数名不一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.ne.md) |
482+
| 114 | [torch.Tensor.neg](https://pytorch.org/docs/1.13/generated/torch.Tensor.neg.html?highlight=neg#torch.Tensor.neg) | [paddle.Tensor.neg](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#neg-name-none) | 功能一致, 无参数 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.neg.md) |
483+
| 115 | [torch.Tensor.not_equal](https://pytorch.org/docs/1.13/generated/torch.Tensor.not_equal.html) | [paddle.Tensor.not_equal](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#not-equal-y-name-none) | 功能一致, 仅参数名不一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.not_equal.md) |
461484

462485

463486

0 commit comments

Comments
 (0)