diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.alpha_dropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.alpha_dropout.md index baf9adf826a..63b861a06af 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.alpha_dropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.alpha_dropout.md @@ -1,13 +1,10 @@ ## [ 参数默认值不一致 ]torch.alpha_dropout - ### [torch.alpha\_dropout](https://pytorch.org/docs/master/generated/torch.nn.functional.alpha_dropout.html) - ```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) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.alpha_dropout(x, p=0.5, training=True, name=None) 其中 PyTorch 和 Paddle 功能一致,参数默认值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | input | x | 输入的多维 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.cuda.amp.GradScaler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.cuda.amp.GradScaler.md index 57909353d1e..5f0b7e0eef9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.cuda.amp.GradScaler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.cuda.amp.GradScaler.md @@ -1,13 +1,11 @@ ## [ 参数默认值不一致 ]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) ``` @@ -15,7 +13,6 @@ paddle.amp.GradScaler(enable=True, init_loss_scaling=65536.0, incr_ratio=2.0, de 其中 Paddle 相比 PyTorch 支持更多其他参数且参数默认值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------------- | ------------------------ |-----------------------------------------------------------------------------| | init_scale | init_loss_scaling | 初始 loss scaling 因子。Paddle 与 PyTorch 默认值不同,Paddle 应设置为 65536.0。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.linalg.diagonal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.linalg.diagonal.md index e4ccdc85fe4..8b7e851e6e5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.linalg.diagonal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.linalg.diagonal.md @@ -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, @@ -18,7 +16,6 @@ paddle.diagonal(x, 两者功能一致且参数用法一致,参数默认值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | A | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.nn.functional.rrelu_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.nn.functional.rrelu_.md index 132fef77394..d5d4aff8157 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.nn.functional.rrelu_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.nn.functional.rrelu_.md @@ -1,13 +1,10 @@ ## [ 参数默认值不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.rrelu(x, lower=1./8., upper=1./3., training=True, name=None 其中 PyTorch 和 Paddle 功能基本一致,前者会在不变更变量内存地址的情况下,直接改变变量的值,一般对网络训练结果影响不大。参数名与参数默认值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.nn.functional.threshold_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.nn.functional.threshold_.md index 071392850ef..e5e3878d652 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.nn.functional.threshold_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.nn.functional.threshold_.md @@ -1,13 +1,10 @@ ## [ 参数默认值不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.thresholded_relu_(x, threshold=1.0, value=0.0, name=None) 两者功能一致,但参数名称与参数默认值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.rrelu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.rrelu.md index 3bb13784fc3..30f592bf167 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.rrelu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_default_value_diff/torch.rrelu.md @@ -1,13 +1,10 @@ ## [ 参数默认值不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.rrelu(x, lower=1./8, upper=1./3, training=True, name=None) 其中 PyTorch 和 Paddle 功能一致,参数名与参数默认值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | ----------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.addmm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.addmm.md index 3e31dff7d08..0eb9cbd87fc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.addmm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.addmm.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.addmm(x, y, alpha=1.0, beta=1.0) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -------------------------------- | | mat1 | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.addmm_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.addmm_.md index 148320a7fa3..47374997c07 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.addmm_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.addmm_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.addmm_(x, y, alpha=1.0, beta=1.0) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -------------------------------- | | mat1 | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.as_strided.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.as_strided.md index 4993959e973..3780921ffbd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.as_strided.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.as_strided.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]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, @@ -8,7 +7,6 @@ torch.Tensor.as_strided(size, ``` ### [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, @@ -18,7 +16,6 @@ paddle.Tensor.as_strided(shape, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | size | shape | 表示输出 Tensor 的维度, 仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.atan2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.atan2.md index 85adc2fab59..d8c573b9161 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.atan2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.atan2.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.atan2(y, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | --------------------------------- | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.baddbmm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.baddbmm.md index f63d0b0fbf5..3edb19fb30b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.baddbmm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.baddbmm.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.baddbmm(x, y, beta=1, alpha=1, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | batch1 | x | 表示输入的第一个 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.baddbmm_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.baddbmm_.md index d1dfe97edfd..ede46e84008 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.baddbmm_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.baddbmm_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.baddbmm_(x, y, beta=1, alpha=1, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | batch1 | x | 表示输入的第一个 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_and.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_and.md index 6c0e4f56349..db789173e9a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_and.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_and.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.bitwise_and(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_and_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_and_.md index 63ca084a097..6c4e5e50dd6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_and_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_and_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.bitwise_and_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_or.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_or.md index b7c92cbb19f..d9c887a41e5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_or.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_or.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.bitwise_or(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_xor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_xor.md index 165c3fb3bd0..fe01650a401 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_xor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_xor.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.bitwise_xor(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_xor_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_xor_.md index 83bee8b1b0d..b8322f1aed6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_xor_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.bitwise_xor_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.bitwise_xor_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.broadcast_to.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.broadcast_to.md index b4e0fb9b997..11d6abb8954 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.broadcast_to.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.broadcast_to.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]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) ``` @@ -15,7 +12,6 @@ paddle.Tensor.broadcast_to(shape, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | size | shape | 给定输入 x 扩展后的形状,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cholesky_solve.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cholesky_solve.md index e84e60e32ed..afda1e04ec0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cholesky_solve.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cholesky_solve.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.cholesky_solve - ### [torch.Tensor.cholesky_solve](https://pytorch.org/docs/stable/generated/torch.Tensor.cholesky_solve.html#torch-tensor-cholesky-solve) - ```python torch.Tensor.cholesky_solve(input2, upper=False) ``` ### [paddle.Tensor.cholesky_solve]() - ```python paddle.Tensor.cholesky_solve(y, upper=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.cholesky_solve(y, upper=False, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------------------------- | | input2 | y | 表示线性方程中 A 矩阵的 Cholesky 分解矩阵 u。仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cross.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cross.md index aa392a05f23..984040fba3a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cross.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cross.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.cross - ### [torch.Tensor.cross](https://pytorch.org/docs/stable/generated/torch.Tensor.cross.html?highlight=cross#torch.Tensor.cross) - ```python torch.Tensor.cross(other, dim=None) ``` ### [paddle.Tensor.cross](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#cross-y-axis-none-name-none) - ```python paddle.Tensor.cross(y, axis=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.cross(y, axis=None, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------- | | other | y | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cumsum_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cumsum_.md index 188fd423774..9e8b166e8f4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cumsum_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.cumsum_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.cumsum_ - ### [torch.Tensor.cumsum_](https://pytorch.org/docs/stable/generated/torch.Tensor.cumsum_.html) - ```python torch.Tensor.cumsum_(dim, dtype=None) ``` ### [paddle.Tensor.cumsum_]() - ```python paddle.Tensor.cumsum_(axis=None, dtype=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.cumsum_(axis=None, dtype=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------ | | dim | axis | 需要累加的维度,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diag.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diag.md index 57085204e82..b6b4aaee59e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diag.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diag.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.diag - ### [torch.Tensor.diag](https://pytorch.org/docs/stable/generated/torch.Tensor.diag.html?highlight=diag#torch.Tensor.diag) - ```python torch.Tensor.diag(diagonal=0) ``` ### [paddle.Tensor.diag](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/diag_cn.html#diag) - ```python paddle.Tensor.diag(offset=0, padding_value=0, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.diag(offset=0, padding_value=0, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------- | -------------------------------------------------------------------------------------- | | - | x | 输入的 Tensor,paddle 参数更多。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diagonal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diagonal.md index 060e17ce132..8992de2009a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diagonal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diagonal.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.diagonal - ### [torch.Tensor.diagonal](https://pytorch.org/docs/stable/generated/torch.Tensor.diagonal.html?highlight=diagonal#torch.Tensor.diagonal) - ```python torch.Tensor.diagonal(offset=0, dim1=0, dim2=1) ``` ### [paddle.Tensor.diagonal](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#diagonal-offset-0-axis1-0-axis2-1-name-none) - ```python paddle.Tensor.diagonal(offset=0, axis1=0, axis2=1, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.diagonal(offset=0, axis1=0, axis2=1, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------------------------- | | offset | offset | 从指定的二维平面中获取对角线的位置,默认值为 0,既主对角线,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diagonal_scatter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diagonal_scatter.md index 98c094badf3..903bd4fa372 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diagonal_scatter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diagonal_scatter.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.diagonal_scatter - +## [ 仅参数名不一致 ]torch.Tensor.diagonal_scatter ### [torch.Tensor.diagonal_scatter](https://pytorch.org/docs/stable/generated/torch.Tensor.diagonal_scatter.html?highlight=diagonal_scatter#torch.Tensor.diagonal_scatter) - ```python torch.Tensor.diagonal_scatter(src, offset=0, dim1=0, dim2=1) ``` ### [paddle.Tensor.diagonal_scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#diagonal-scatter-x-y-offset-0-axis1-0-axis2-1-name-none) - ```python paddle.Tensor.diagonal_scatter(y, offset=0, axis1=0, axis2=1) ``` @@ -15,7 +12,6 @@ paddle.Tensor.diagonal_scatter(y, offset=0, axis1=0, axis2=1) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |---------|--------------| -------------------------------------------------- | | src | y | 用于嵌入的张量,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diff.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diff.md index 07d2c4b466b..b14246f58e1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diff.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.diff.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.diff - ### [torch.Tensor.diff](https://pytorch.org/docs/stable/generated/torch.Tensor.diff.html?highlight=diff#torch.Tensor.diff) - ```python torch.Tensor.diff(n=1, dim=- 1, prepend=None, append=None) ``` ### [paddle.Tensor.diff](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/diff_cn.html#diff) - ```python paddle.Tensor.diff(n=1, axis=-1, prepend=None, append=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.diff(n=1, axis=-1, prepend=None, append=None, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | n | n | 需要计算前向差值的次数,支持任意正整数,默认值为 1。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.dist.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.dist.md index 9ee04654414..7eb2b0007b5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.dist.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.dist.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.dist - ### [torch.Tensor.dist](https://pytorch.org/docs/stable/generated/torch.Tensor.dist.html?highlight=dist#torch.Tensor.dist) - ```python torch.Tensor.dist(other, p=2) ``` ### [paddle.Tensor.dist](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#dist-y-p-2) - ```python paddle.Tensor.dist(y, p=2) ``` @@ -15,7 +12,6 @@ paddle.Tensor.dist(y, p=2) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------- | | other | y | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.dsplit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.dsplit.md index 7c5c36ff77d..b8a9630b504 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.dsplit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.dsplit.md @@ -4,13 +4,11 @@ api 存在重载情况,分别如下: ------------------------------------------------------------------------------------------------- ### [torch.Tensor.dsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.dsplit.html) - ```python torch.Tensor.dsplit(sections) ``` ### [paddle.Tensor.dsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#dsplit-num_or_indices-name-none) - ```python paddle.Tensor.dsplit(num_or_indices, name=None) ``` @@ -18,7 +16,6 @@ paddle.Tensor.dsplit(num_or_indices, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | sections | num_or_indices | 表示分割的数量,仅参数名不一致。 | @@ -26,13 +23,11 @@ paddle.Tensor.dsplit(num_or_indices, name=None) ------------------------------------------------------------------------------------------------- ### [torch.Tensor.dsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.dsplit.html) - ```python torch.Tensor.dsplit(indices) ``` ### [paddle.Tensor.dsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#dsplit-num_or_indices-name-none) - ```python paddle.Tensor.dsplit(num_or_indices, name=None) ``` @@ -40,7 +35,6 @@ paddle.Tensor.dsplit(num_or_indices, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | indices | num_or_indices | 表示分割的索引,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.flip.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.flip.md index 728bbef4069..d5f1f476a67 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.flip.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.flip.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.flip - ### [torch.Tensor.flip](https://pytorch.org/docs/stable/generated/torch.Tensor.flip.html?highlight=flip#torch.Tensor.flip) - ```python torch.Tensor.flip(dims) ``` ### [paddle.Tensor.flip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#flip-axis-name-none) - ```python paddle.Tensor.flip(axis, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.flip(axis, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------- | | dims | axis | 需要翻转的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.fmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.fmax.md index 19bdae5efa4..c091ff1f1fa 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.fmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.fmax.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.fmax - ### [torch.Tensor.fmax](https://pytorch.org/docs/stable/generated/torch.Tensor.fmax.html?highlight=fmax#torch.Tensor.fmax) - ```python torch.Tensor.fmax(other) ``` ### [paddle.Tensor.fmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fmax_cn.html#fmax) - ```python paddle.Tensor.fmax(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.fmax(y, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------- | | other | y | 输入的第二个 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.fmin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.fmin.md index c6167263ca1..7d6205c60dc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.fmin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.fmin.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.fmin - ### [torch.Tensor.fmin](https://pytorch.org/docs/stable/generated/torch.Tensor.fmin.html?highlight=fmin#torch.Tensor.fmin) - ```python torch.Tensor.fmin(other) ``` ### [paddle.Tensor.fmin](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fmin_cn.html#fmin) - ```python paddle.Tensor.fmin(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.fmin(y, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------- | | other | y | 输入的第二个 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.gcd.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.gcd.md index 1fc3cab92bc..17cc6cbbdc1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.gcd.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.gcd.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.Tensor.gcd - ### [torch.Tensor.gcd](https://pytorch.org/docs/stable/generated/torch.Tensor.gcd.html?highlight=torch+tensor+gcd#torch.Tensor.gcd) - ```python torch.Tensor.gcd(other) ``` ### [paddle.Tensor.gcd](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#gcd-x-y-name-none) - ```python paddle.Tensor.gcd(y, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|------------------------------| ------------------------------------------------------ | | other | y | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.gcd_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.gcd_.md index 05f22e4f10a..39d24dc04a9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.gcd_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.gcd_.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.Tensor.gcd_ - ### [torch.Tensor.gcd_](https://pytorch.org/docs/stable/generated/torch.Tensor.gcd_.html) - ```python torch.Tensor.gcd_(other) ``` ### [paddle.Tensor.gcd_]() - ```python paddle.Tensor.gcd_(y) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|------------------------------| ------------------------------------------------------ | | other | y | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ger.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ger.md index bfe64f31a49..52cbd75c55e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ger.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ger.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.Tensor.ger - ### [torch.Tensor.ger](https://pytorch.org/docs/stable/generated/torch.Tensor.ger.html?highlight=torch+tensor+ger#torch.Tensor.ger) - ```python torch.Tensor.ger(vec2) ``` ### [paddle.Tensor.outer]() - ```python paddle.Tensor.outer(y, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |--------------------------------|------------------------------| ------------------------------------------------------ | | vec2 | y | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hardshrink.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hardshrink.md index 7afc12c0a0c..e3d82a9d425 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hardshrink.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hardshrink.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.hardshrink - ### [torch.Tensor.hardshrink](https://pytorch.org/docs/stable/generated/torch.Tensor.hardshrink.html?highlight=torch+tensor+hardshrink#torch.Tensor.hardshrink) - ```python torch.Tensor.hardshrink(lambd=0.5) ``` ### [paddle.nn.functional.hardshrink](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/hardshrink_cn.html#hardshrink) - ```python paddle.nn.functional.hardshrink(x, threshold=0.5, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.hardshrink(x, threshold=0.5, name=None) 仅参数名不一致,具体如下。 ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |-----------------------------------|------------------------------| ------------------------------------------------------ | | lambd | threshold | Hardshrink 阈值,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.heaviside.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.heaviside.md index ad36120a311..81e2a669030 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.heaviside.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.heaviside.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.Tensor.heaviside - ### [torch.Tensor.heaviside](https://pytorch.org/docs/stable/generated/torch.Tensor.heaviside.html?highlight=torch+tensor+heaviside#torch.Tensor.heaviside) - ```python torch.Tensor.heaviside(values) ``` ### [paddle.Tensor.heaviside](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#heaviside-y-name-none) - ```python paddle.Tensor.heaviside(y, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |-----------------------------------|------------------------------| ------------------------------------------------------ | | values | y | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hsplit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hsplit.md index fccfa0ea794..00155566efc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hsplit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hsplit.md @@ -4,13 +4,11 @@ api 存在重载情况,分别如下: ------------------------------------------------------------------------------------------------- ### [torch.Tensor.hsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.hsplit.html) - ```python torch.Tensor.hsplit(sections) ``` ### [paddle.Tensor.hsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#hsplit-num_or_indices-name-none) - ```python paddle.Tensor.hsplit(num_or_indices, name=None) ``` @@ -18,7 +16,6 @@ paddle.Tensor.hsplit(num_or_indices, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | sections | num_or_indices | 表示分割的数量,仅参数名不一致。 | @@ -26,13 +23,11 @@ paddle.Tensor.hsplit(num_or_indices, name=None) ------------------------------------------------------------------------------------------------- ### [torch.Tensor.hsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.hsplit.html) - ```python torch.Tensor.hsplit(indices) ``` ### [paddle.Tensor.hsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#hsplit-num_or_indices-name-none) - ```python paddle.Tensor.hsplit(num_or_indices, name=None) ``` @@ -40,7 +35,6 @@ paddle.Tensor.hsplit(num_or_indices, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | indices | num_or_indices | 表示分割的索引,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hypot.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hypot.md index 29bdc4ba107..2f5c76e1a56 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hypot.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hypot.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.hypot - ### [torch.Tensor.hypot](https://pytorch.org/docs/stable/generated/torch.Tensor.hypot.html#torch.Tensor.hypot) - ```python torch.Tensor.hypot(other) ``` ### [paddle.Tensor.hypot](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hypot_cn.html) - ```python paddle.Tensor.hypot(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.hypot(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | other | y | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hypot_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hypot_.md index 763ae17fb82..2e847233329 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hypot_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.hypot_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.hypot_ - ### [torch.Tensor.hypot_](https://pytorch.org/docs/stable/generated/torch.Tensor.hypot_.html#torch.Tensor.hypot_) - ```python torch.Tensor.hypot_(other) ``` ### [paddle.Tensor.hypot_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hypot__cn.html) - ```python paddle.Tensor.hypot_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.hypot_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | other | y | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igamma.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igamma.md index f1fd0c518de..56d365250e1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igamma.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igamma.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.igamma - ### [torch.Tensor.igamma](https://pytorch.org/docs/stable/generated/torch.Tensor.igamma.html#torch.Tensor.igamma) - ```python torch.Tensor.igamma(other) ``` ### [paddle.Tensor.gammainc](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/gammainc_cn.html#gammainc) - ```python paddle.Tensor.gammainc(y, name=None) ``` @@ -15,17 +12,6 @@ paddle.Tensor.gammainc(y, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------- | | other | y | 正参数 Tensor,仅参数名不同 | - -### 转写示例 - -```python -# PyTorch 写法 -out = x.igamma(y) - -# Paddle 写法 -out = x.gammainc(y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igamma_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igamma_.md index 01e1c3ad754..d3fb30cb401 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igamma_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igamma_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.igamma_ - ### [torch.Tensor.igamma_](https://pytorch.org/docs/stable/generated/torch.Tensor.igamma_.html#torch.Tensor.igamma_) - ```python torch.Tensor.igamma_(other) ``` ### [paddle.Tensor.gammainc_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/gammainc__cn.html#gammainc) - ```python paddle.Tensor.gammainc_(y, name=None) ``` @@ -15,17 +12,6 @@ paddle.Tensor.gammainc_(y, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------- | | other | y | 正参数 Tensor,仅参数名不同 | - -### 转写示例 - -```python -# PyTorch 写法 -out = x.igamma_(y) - -# Paddle 写法 -out = x.gammainc_(y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igammac.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igammac.md index f33381e2813..27349582a41 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igammac.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igammac.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.igammac - ### [torch.Tensor.igammac](https://pytorch.org/docs/stable/generated/torch.Tensor.igammac.html#torch.Tensor.igammac) - ```python torch.Tensor.igammac(other) ``` ### [paddle.Tensor.gammaincc](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/gammaincc_cn.html#gammaincc) - ```python paddle.Tensor.gammaincc(y, name=None) ``` @@ -15,17 +12,6 @@ paddle.Tensor.gammaincc(y, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------- | | other | y | 正参数 Tensor,仅参数名不同 | - -### 转写示例 - -```python -# PyTorch 写法 -out = x.igammac(y) - -# Paddle 写法 -out = x.gammaincc(y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igammac_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igammac_.md index 93a4f1322c4..821a005045e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igammac_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.igammac_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.igammac_ - ### [torch.Tensor.igammac_](https://pytorch.org/docs/stable/generated/torch.Tensor.igammac_.html#torch.Tensor.igammac_) - ```python torch.Tensor.igammac_(other) ``` ### [paddle.Tensor.gammaincc_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/gammaincc__cn.html#gammaincc) - ```python paddle.Tensor.gammaincc_(y, name=None) ``` @@ -15,17 +12,6 @@ paddle.Tensor.gammaincc_(y, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------- | | other | y | 正参数 Tensor,仅参数名不同 | - -### 转写示例 - -```python -# PyTorch 写法 -out = x.igammac_(y) - -# Paddle 写法 -out = x.gammaincc_(y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_fill.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_fill.md index 64453f03a05..708c0f5b9ac 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_fill.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_fill.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.index_fill ### [torch.Tensor.index_fill](https://pytorch.org/docs/stable/generated/torch.Tensor.index_fill.html?highlight=index_fill#torch.Tensor.index_fill) - ```python torch.Tensor.index_fill(dim, index, value) ``` ### [paddle.Tensor.index_fill](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/index_fill_cn.html#index-fill) - ```python paddle.Tensor.index_fill(index, axis, value, name=None) ``` @@ -14,18 +12,8 @@ paddle.Tensor.index_fill(index, axis, value, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 表示进行运算的轴,仅参数名不一致。 | | index | index | 包含索引下标的 1-D Tensor。 | | value | value | 填充的值。 | - -### 转写示例 -#### alpha:source 的缩放倍数 -```python -# PyTorch 写法 -x.index_fill(dim=1, index=index, value=1) - -# Paddle 写法 -x.index_fill(index=index, axis=1, value=1) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_fill_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_fill_.md index f9481ead96e..f8648ab86c4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_fill_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_fill_.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.index_fill_ ### [torch.Tensor.index_fill_](https://pytorch.org/docs/stable/generated/torch.Tensor.index_fill_.html?highlight=index_fill_#torch.Tensor.index_fill_) - ```python torch.Tensor.index_fill_(dim, index, value) ``` ### [paddle.Tensor.index_fill_]() - ```python paddle.Tensor.index_fill_(index, axis, value, name=None) ``` @@ -14,18 +12,8 @@ paddle.Tensor.index_fill_(index, axis, value, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 表示进行运算的轴,仅参数名不一致。 | | index | index | 包含索引下标的 1-D Tensor。 | | value | value | 填充的值。 | - -### 转写示例 -#### alpha:source 的缩放倍数 -```python -# PyTorch 写法 -x.index_fill_(dim=1, index=index, value=1) - -# Paddle 写法 -x.index_fill_(index=index, axis=1, value=1) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_put.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_put.md index 6df21ecee94..d573092a442 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_put.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_put.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.index_put ### [torch.Tensor.index_put](https://pytorch.org/docs/stable/generated/torch.Tensor.index_put.html?highlight=index_put#torch.Tensor.index_put) - ```python torch.Tensor.index_put(indices, values, accumulate=False) ``` ### [paddle.Tensor.index_put](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/index_put_cn.html#index-put) - ```python paddle.Tensor.index_put(indices, value, accumulate=False, name=None) ``` @@ -14,7 +12,6 @@ paddle.Tensor.index_put(indices, value, accumulate=False, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | indices | indices | 包含用来索引的 tensors 的元组。数据类型为 int32,int64,bool。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_put_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_put_.md index 3e26d9ca671..1103cb0a2a7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_put_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.index_put_.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.index_put_ ### [torch.Tensor.index_put_](https://pytorch.org/docs/stable/generated/torch.Tensor.index_put_.html#torch.Tensor.index_put_) - ```python torch.Tensor.index_put_(indices, values, accumulate=False) ``` ### [paddle.Tensor.index_put_]() - ```python paddle.Tensor.index_put_(indices, value, accumulate=False) ``` @@ -14,7 +12,6 @@ paddle.Tensor.index_put_(indices, value, accumulate=False) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | indices | indices | 包含用来索引的 tensors 的元组。数据类型为 int32,int64,bool。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.inner.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.inner.md index 6645b6a85a1..5984661840d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.inner.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.inner.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.inner - ### [torch.Tensor.inner](https://pytorch.org/docs/stable/generated/torch.Tensor.inner.html) - ```python torch.Tensor.inner(other) ``` ### [paddle.Tensor.inner]() - ```python paddle.Tensor.inner(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.inner(y, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | other | y | 计算内积的第二个 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.isclose.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.isclose.md index 4febf657ad7..740d7215796 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.isclose.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.isclose.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.isclose - ### [torch.Tensor.isclose](https://pytorch.org/docs/stable/generated/torch.Tensor.isclose.html) - ```python torch.Tensor.isclose(other, rtol=1e-05, atol=1e-08, equal_nan=False) ``` ### [paddle.Tensor.isclose](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#isclose-x-y-rtol-1e-05-atol-1e-08-equal-nan-false-name-none) - ```python paddle.Tensor.isclose(y, rtol=1e-05, atol=1e-08, equal_nan=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.isclose(y, rtol=1e-05, atol=1e-08, equal_nan=False, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | -- | | other | y | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.kthvalue.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.kthvalue.md index 14e12070400..f0652ebb367 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.kthvalue.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.kthvalue.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.kthvalue - ### [torch.Tensor.kthvalue](https://pytorch.org/docs/stable/generated/torch.Tensor.kthvalue.html) - ```python torch.Tensor.kthvalue(k, dim=None, keepdim=False) ``` ### [paddle.Tensor.kthvalue](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#kthvalue-k-axis-none-keepdim-false-name-none) - ```python paddle.Tensor.kthvalue(k, axis=None, keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.kthvalue(k, axis=None, keepdim=False, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | k | k | 需要沿轴查找的第 k 小,所对应的 k 值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lcm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lcm.md index 3a510e267ce..01488d453ae 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lcm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lcm.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.lcm - ### [torch.Tensor.lcm](https://pytorch.org/docs/stable/generated/torch.Tensor.lcm.html) - ```python torch.Tensor.lcm(other) ``` ### [paddle.Tensor.lcm]() - ```python paddle.Tensor.lcm(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.lcm(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lcm_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lcm_.md index 6707cbaa8a8..eff383b22a3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lcm_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lcm_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.lcm_ - ### [torch.Tensor.lcm_](https://pytorch.org/docs/stable/generated/torch.Tensor.lcm_.html) - ```python torch.Tensor.lcm_(other) ``` ### [paddle.Tensor.lcm_]() - ```python paddle.Tensor.lcm_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.lcm_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ldexp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ldexp.md index 9959a20aec0..538b1f2746d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ldexp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ldexp.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.ldexp - ### [torch.Tensor.ldexp](https://pytorch.org/docs/stable/generated/torch.Tensor.ldexp.html#torch.Tensor.ldexp) - ```python torch.Tensor.ldexp(other) ``` ### [paddle.Tensor.ldexp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor) - ```python paddle.Tensor.ldexp(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.ldexp(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ldexp_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ldexp_.md index 78a07731572..e0a6b655e6f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ldexp_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ldexp_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.ldexp_ - ### [torch.Tensor.ldexp_](https://pytorch.org/docs/stable/generated/torch.Tensor.ldexp_.html) - ```python torch.Tensor.ldexp_(other) ``` ### [paddle.Tensor.ldexp_]() - ```python paddle.Tensor.ldexp_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.ldexp_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lerp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lerp.md index f5ff60d6a61..657be8f2414 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lerp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lerp.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.lerp - ### [torch.Tensor.lerp](https://pytorch.org/docs/stable/generated/torch.Tensor.lerp.html) - ```python torch.Tensor.lerp(end, weight) ``` ### [paddle.Tensor.lerp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#lerp-x-y-weight-name-none) - ```python paddle.Tensor.lerp(y, weight, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.lerp(y, weight, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | end | y | 输入的 Tensor,作为线性插值结束的点,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lerp_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lerp_.md index b9f932c7a85..39d71173360 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lerp_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.lerp_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.lerp_ - ### [torch.Tensor.lerp\_](https://pytorch.org/docs/stable/generated/torch.Tensor.lerp_.html) - ```python torch.Tensor.lerp_(end, weight) ``` ### [paddle.Tensor.lerp\_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#lerp-x-y-weight-name-none) - ```python paddle.Tensor.lerp_(y, weight, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.lerp_(y, weight, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | end | y | 输入的 Tensor,作为线性插值结束的点,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logaddexp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logaddexp.md index aeab6336544..3c914cb953f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logaddexp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logaddexp.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.logaddexp - ### [torch.Tensor.logaddexp](https://pytorch.org/docs/stable/generated/torch.Tensor.logaddexp.html#torch.Tensor.logaddexp) - ```python torch.Tensor.logaddexp(other) ``` ### [paddle.Tensor.logaddexp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor) - ```python paddle.Tensor.logaddexp(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.logaddexp(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_and_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_and_.md index 706d75e95c8..f446b48d07f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_and_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_and_.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.logical_and_ - +## [ 仅参数名不一致 ]torch.Tensor.logical_and_ ### [torch.Tensor.logical_and_](https://pytorch.org/docs/stable/generated/torch.Tensor.logical_and_.html) - ```python torch.Tensor.logical_and_(other) ``` ### [paddle.Tensor.logical_and_]() - ```python paddle.Tensor.logical_and_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.logical_and_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_or_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_or_.md index a23d96b55cd..2a0efdb0fc2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_or_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_or_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.logical_or_ - ### [torch.Tensor.logical_or_](https://pytorch.org/docs/stable/generated/torch.Tensor.logical_or_.html) - ```python torch.Tensor.logical_or_(other) ``` ### [paddle.Tensor.logical_or_]() - ```python paddle.Tensor.logical_or_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.logical_or_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_xor_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_xor_.md index fed008219c3..a54cca21b34 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_xor_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.logical_xor_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.logical_xor_ - ### [torch.Tensor.logical_xor_](https://pytorch.org/docs/stable/generated/torch.Tensor.logical_xor_.html) - ```python torch.Tensor.logical_xor_(other) ``` ### [paddle.Tensor.logical_xor_]() - ```python paddle.Tensor.logical_xor_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.logical_xor_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.maximum.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.maximum.md index 6e8ce912b07..a648db700b1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.maximum.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.maximum.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.maximum - +## [ 仅参数名不一致 ]torch.Tensor.maximum ### [torch.Tensor.maximum](https://pytorch.org/docs/stable/generated/torch.Tensor.maximum.html#torch.Tensor.maximum) - ```python torch.Tensor.maximum(other) ``` ### [paddle.Tensor.maximum](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#maximum-y-axis-1-name-none) - ```python paddle.Tensor.maximum(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.maximum(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|---------------------------------|------------------------------------| | other | y | 输⼊第二个 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.minimum.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.minimum.md index d3d25f24bf0..765bc8c87e4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.minimum.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.minimum.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.minimum - +## [ 仅参数名不一致 ]torch.Tensor.minimum ### [torch.Tensor.minimum](https://pytorch.org/docs/stable/generated/torch.Tensor.minimum.html) - ```python torch.Tensor.minimum(other) ``` ### [paddle.Tensor.minimum](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#minimum-y-axis-1-name-none) - ```python paddle.Tensor.minimum(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.minimum(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|---------------------------------|------------------------------------| | other | y | 输⼊第二个 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.mode.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.mode.md index 9cabd358f1e..de8936e950a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.mode.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.mode.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.mode - ### [torch.Tensor.mode](https://pytorch.org/docs/stable/generated/torch.Tensor.mode.html) - ```python torch.Tensor.mode(dim=None, keepdim=False) ``` ### [paddle.Tensor.mode](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#mode-axis-1-keepdim-false-name-none) - ```python paddle.Tensor.mode(axis=-1, keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.mode(axis=-1, keepdim=False, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | dim | axis | 指定对输入 Tensor 进行运算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nanquantile.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nanquantile.md index a62c9ceb326..910a156a73e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nanquantile.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nanquantile.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.nanquantile - +## [ 仅参数名不一致 ]torch.Tensor.nanquantile ### [torch.Tensor.nanquantile](https://pytorch.org/docs/stable/generated/torch.nanquantile.html#torch.nanquantile) - ```python torch.Tensor.nanquantile(q, dim=None, keepdim=False, *, interpolation='linear') ``` ### [paddle.Tensor.nanquantile](https://github.com/PaddlePaddle/Paddle/pull/41343) - ```python paddle.Tensor.nanquantile(q, axis=None, keepdim=False, interpolation='linear') ``` @@ -15,7 +12,6 @@ paddle.Tensor.nanquantile(q, axis=None, keepdim=False, interpolation='linear') 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ |-----------------------------------------------------------------------------------------------------------------------------------| | q | q | 待计算的分位数。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nansum.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nansum.md index 24f1b469f5e..266f2253e26 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nansum.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nansum.md @@ -1,6 +1,5 @@ -## [ 仅参数名不一致 ] torch.Tensor.nansum +## [ 仅参数名不一致 ]torch.Tensor.nansum ### [torch.Tensor.nansum](https://pytorch.org/docs/stable/generated/torch.Tensor.nansum.html?highlight=nansum#torch.Tensor.nansum) - ```python torch.Tensor.nansum(dim=None, keepdim=False, @@ -8,7 +7,6 @@ torch.Tensor.nansum(dim=None, ``` ### [paddle.Tensor.nansum]() - ```python paddle.Tensor.nansum(axis=None, keepdim=False, @@ -18,7 +16,6 @@ paddle.Tensor.nansum(axis=None, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 需要求和的维度,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nextafter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nextafter.md index ec5933db60a..9aaa3f87d88 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nextafter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.nextafter.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.Tensor.nextafter - +## [ 仅参数名不一致 ]torch.Tensor.nextafter ### [torch.Tensor.nextafter](https://pytorch.org/docs/stable/generated/torch.Tensor.nextafter.html#torch.Tensor.nextafter) - ```python torch.Tensor.nextafter(other) ``` ### [paddle.Tensor.nextafter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nextafter_cn.html) - ```python paddle.Tensor.nextafter(y) ``` @@ -16,7 +13,6 @@ paddle.Tensor.nextafter(y) ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------- | | other | y | 输⼊第二个 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.orgqr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.orgqr.md index 9a0e411fa79..e3a0b32f1fc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.orgqr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.orgqr.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.orgqr - ### [torch.Tensor.orgqr](https://pytorch.org/docs/stable/generated/torch.Tensor.orgqr.html#torch.Tensor.orgqr) - ```python torch.Tensor.orgqr(input2) ``` ### [paddle.Tensor.householder_product](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/householder_product_cn.html#householder-product) - ```python paddle.Tensor.householder_product(tau, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.householder_product(tau, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------ | | input2 | tau | 用于计算矩阵乘积,仅参数名不同 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ormqr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ormqr.md index dea1d02be7c..12e89918508 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ormqr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.ormqr.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.ormqr - ### [torch.Tensor.ormqr](https://pytorch.org/docs/stable/generated/torch.Tensor.orgqr.html#torch.Tensor.orgqr) - ```python torch.Tensor.ormqr(input2, input3, left=True, transpose=False) ``` ### [paddle.linalg.ormqr](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/linalg/ormqr_cn.html#ormqr) - ```python paddle.linalg.ormqr(x, tau, y, left=True, transpose=False) ``` @@ -15,7 +12,6 @@ paddle.linalg.ormqr(x, tau, y, left=True, transpose=False) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | ---------------------------------- | | input2 | tau | Householder 反射系数,仅参数名不同 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.outer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.outer.md index e94b35f22ec..b274fe79e94 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.outer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.outer.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.outer - +## [ 仅参数名不一致 ]torch.Tensor.outer ### [torch.Tensor.outer](https://pytorch.org/docs/stable/generated/torch.Tensor.outer.html?highlight=outer#torch.Tensor.outer) - ```python torch.Tensor.outer(vec2) ``` ### [paddle.Tensor.outer]() - ```python paddle.Tensor.outer(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.outer(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------------------- | | vec2 | y | 如果类型是多维 `Tensor`,其数据类型应该和 `x` 相同,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.pow_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.pow_.md index 02af8eb91d0..9befe9b4af2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.pow_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.pow_.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.pow_ - +## [ 仅参数名不一致 ]torch.Tensor.pow_ ### [torch.Tensor.pow_](https://pytorch.org/docs/stable/generated/torch.Tensor.pow_.html) - ```python torch.Tensor.pow_(exponent) ``` ### [paddle.Tensor.pow_]() - ```python paddle.Tensor.pow_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.pow_(y) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -------------------------------------------------- | | exponent | y | 一个标量 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.quantile.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.quantile.md index 6757255ccf6..39302dd29be 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.quantile.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.quantile.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.quantile - ### [torch.Tensor.quantile](https://pytorch.org/docs/stable/generated/torch.Tensor.quantile.html#torch.Tensor.quantile) - ```python torch.Tensor.quantile(q, dim=None, keepdim=False, *, interpolation='linear') ``` ### [paddle.Tensor.quantile](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#quantile-q-axis-none-keepdim-false-name-none) - ```python paddle.Tensor.quantile(q, axis=None, keepdim=False, interpolation='linear', name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.quantile(q, axis=None, keepdim=False, interpolation='linear', name 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------ | | q | q | 待计算的分位数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.renorm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.renorm.md index 10bd5a545c6..da7ef8ab1a0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.renorm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.renorm.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.renorm - ### [torch.Tensor.renorm](https://pytorch.org/docs/stable/generated/torch.Tensor.renorm.html#torch-tensor-renorm) - ```python torch.Tensor.renorm(p, dim, maxnorm) ``` ### [paddle.Tensor.renorm]() - ```python paddle.Tensor.renorm(p, axis, max_norm) ``` @@ -15,7 +12,6 @@ paddle.Tensor.renorm(p, axis, max_norm) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------- | | p | p | 表示 p-范数计算的 p 值。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.renorm_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.renorm_.md index 00382356b2c..59e45c5097b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.renorm_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.renorm_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.renorm_ - ### [torch.Tensor.renorm_](https://pytorch.org/docs/stable/generated/torch.Tensor.renorm_.html#torch-tensor-renorm_) - ```python torch.Tensor.renorm_(p, dim, maxnorm) ``` ### [paddle.Tensor.renorm_]() - ```python paddle.Tensor.renorm_(p, axis, max_norm) ``` @@ -15,7 +12,6 @@ paddle.Tensor.renorm_(p, axis, max_norm) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------- | | p | p | 表示 p-范数计算的 p 值。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.roll.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.roll.md index d20e97309ae..4a088eadd16 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.roll.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.roll.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.roll ### [torch.Tensor.roll](https://pytorch.org/docs/stable/generated/torch.Tensor.roll.html?highlight=torch+tensor+roll#torch.Tensor.roll) - ```python torch.Tensor.roll(shifts, dims) ``` ### [paddle.Tensor.roll](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/roll_cn.html#roll) - ```python paddle.Tensor.roll(shifts, axis=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.rot90.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.rot90.md index 844f3de32b5..cdcb1f7bc7d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.rot90.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.rot90.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.rot90 - ### [torch.Tensor.rot90](https://pytorch.org/docs/stable/generated/torch.Tensor.rot90.html?highlight=torch+tensor+rot90#torch.Tensor.rot90) - ```python torch.Tensor.rot90(k, dims) ``` ### [paddle.Tensor.rot90]() - ```python paddle.Tensor.rot90(k=1, axes=[0, 1]) ``` @@ -15,7 +12,6 @@ paddle.Tensor.rot90(k=1, axes=[0, 1]) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | k | k | 旋转方向和次数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.select_scatter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.select_scatter.md index a85146162dc..916b76f1aaf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.select_scatter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.select_scatter.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.select_scatter - +## [ 仅参数名不一致 ]torch.Tensor.select_scatter ### [torch.Tensor.select_scatter](https://pytorch.org/docs/stable/generated/torch.Tensor.select_scatter.html#torch-select-scatter) - ```python torch.Tensor.select_scatter(src, dim, index) ``` ### [paddle.Tensor.select_scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#) - ```python paddle.Tensor.select_scatter(values, axis, index, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.select_scatter(values, axis, index, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------- | | src | values | 用于嵌入的张量,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.squeeze_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.squeeze_.md index e5d11ed48be..cbb22584dda 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.squeeze_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.squeeze_.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.Tensor.squeeze_ - ### [torch.Tensor.squeeze_](https://pytorch.org/docs/stable/generated/torch.Tensor.squeeze_.html#torch-tensor-squeeze) - ```python torch.Tensor.squeeze_(dim=None) ``` ### [paddle.Tensor.squeeze_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#id19) - ```python paddle.Tensor.squeeze_(axis=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 输入一个或一列整数,代表要压缩的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.std.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.std.md index 254e5b6003f..d8caad9ce01 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.std.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.std.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.std - ### [torch.Tensor.std](https://pytorch.org/docs/stable/generated/torch.Tensor.std.html?highlight=torch+tensor+std#torch.Tensor.std) - ```python torch.Tensor.std(dim=None, *, correction=1, keepdim=False) ``` ### [paddle.Tensor.std](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#std-axis-none-unbiased-true-keepdim-false-name-none) - ```python paddle.Tensor.std(axis=None, unbiased=True, keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.std(axis=None, unbiased=True, keepdim=False, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | ------- | | dim | axis | 指定对 Tensor 进行计算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.tensor_split.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.tensor_split.md index 536226586f7..c4fed407de1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.tensor_split.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.tensor_split.md @@ -4,13 +4,11 @@ api 存在重载情况,分别如下: ------------------------------------------------------------------------------------------------- ### [torch.Tensor.tensor_split](https://pytorch.org/docs/stable/generated/torch.Tensor.tensor_split.html) - ```python torch.Tensor.tensor_split(indices, dim=0) ``` ### [paddle.Tensor.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor_split-num_or_indices-axis-0-name-none) - ```python paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None) ``` @@ -18,7 +16,6 @@ paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | indices | num_or_indices | 表示分割的索引,仅参数名不一致。 | @@ -27,13 +24,11 @@ paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None) ------------------------------------------------------------------------------------------------- ### [torch.Tensor.tensor_split](https://pytorch.org/docs/stable/generated/torch.Tensor.tensor_split.html) - ```python torch.Tensor.tensor_split(tensor_indices_or_sections, dim=0) ``` ### [paddle.Tensor.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor_split-num_or_indices-axis-0-name-none) - ```python paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None) ``` @@ -43,13 +38,11 @@ Paddle 当前无对应功能,功能缺失。 ------------------------------------------------------------------------------------------------- ### [torch.Tensor.tensor_split](https://pytorch.org/docs/stable/generated/torch.Tensor.tensor_split.html) - ```python torch.Tensor.tensor_split(sections, dim=0) ``` ### [paddle.Tensor.tensor_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor_split-num_or_indices-axis-0-name-none) - ```python paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None) ``` @@ -57,7 +50,6 @@ paddle.Tensor.tensor_split(num_or_indices, axis=0, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | sections | num_or_indices | 表示分割的数量,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.true_divide_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.true_divide_.md index d4aa4b715b0..8546ade98ec 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.true_divide_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.true_divide_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.true_divide_ - ### [torch.Tensor.true_divide_](https://pytorch.org/docs/stable/generated/torch.Tensor.true_divide_.html) - ```python torch.Tensor.true_divide_(other) ``` ### [paddle.Tensor.divide_]() - ```python paddle.Tensor.divide_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.divide_(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -------------------------------- | | other | y | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unflatten.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unflatten.md index 304ddcf5f13..c9585d52aed 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unflatten.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unflatten.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.Tensor.unflatten - +## [ 仅参数名不一致 ]torch.Tensor.unflatten ### [torch.Tensor.unflatten](https://pytorch.org/docs/stable/generated/torch.Tensor.unflatten.html#torch.Tensor.unflatten) - ```python torch.Tensor.unflatten(dim, sizes) ``` ### [paddle.Tensor.unflatten](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#unflatten-axis-shape-name-none) - ```python paddle.Tensor.unflatten(axis, shape, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.unflatten(axis, shape, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 需要变换的维度,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unfold.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unfold.md index c427aefcb1c..f66ea982b19 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unfold.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unfold.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.Tensor.unfold - ### [torch.Tensor.unfold](https://pytorch.org/docs/stable/generated/torch.Tensor.unfold.html?highlight=unfold#torch.Tensor.unfold) - ```python torch.Tensor.unfold(dimension, size, @@ -9,7 +7,6 @@ torch.Tensor.unfold(dimension, ``` ### [paddle.Tensor.unfold](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#unfold-x-axis-size-step-name-none) - ```python paddle.Tensor.unfold(axis, size, @@ -20,7 +17,6 @@ paddle.Tensor.unfold(axis, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------ | | dimension | axis | 表示需要提取的维度,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unsqueeze_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unsqueeze_.md index eaee5065fa9..c6c74b95d5a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unsqueeze_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.unsqueeze_.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.Tensor.unsqueeze_ - +## [ 仅参数名不一致 ]torch.Tensor.unsqueeze_ ### [torch.Tensor.unsqueeze_](https://pytorch.org/docs/stable/generated/torch.Tensor.unsqueeze_.html#torch-tensor-unsqueeze) - ```python torch.Tensor.unsqueeze_(dim) ``` ### [paddle.Tensor.unsqueeze_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#id22) - ```python paddle.Tensor.unsqueeze_(axis, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.unsqueeze_(axis, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------- | | dim | axis | 表示进行运算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.var.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.var.md index 270b450296f..7c3ac59ca90 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.var.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.var.md @@ -1,20 +1,16 @@ -## [仅参数名不一致]torch.Tensor.var - +## [ 仅参数名不一致 ]torch.Tensor.var ### [torch.Tensor.var](https://pytorch.org/docs/stable/generated/torch.Tensor.var.html#torch.Tensor.var) - ```python torch.Tensor.var(dim, unbiased=True, keepdim=False) ``` ### [paddle.Tensor.var](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#var-axis-none-unbiased-true-keepdim-false-name-none) - ```python paddle.Tensor.var(axis=None, unbiased=True, keepdim=False, name=None) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 指定对 Tensor 进行计算的轴 ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.vdot.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.vdot.md index a2c04d3c96c..d25c94581f7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.vdot.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.vdot.md @@ -1,20 +1,16 @@ -## [仅参数名不一致]torch.Tensor.vdot - +## [ 仅参数名不一致 ]torch.Tensor.vdot ### [torch.Tensor.vdot](https://pytorch.org/docs/stable/generated/torch.Tensor.vdot.html#torch.Tensor.vdot) - ```python torch.Tensor.vdot(other) ``` ### [paddle.Tensor.dot](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#dot-y-name-none) - ```python paddle.Tensor.dot(y, name=None) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 被乘的向量。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.vsplit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.vsplit.md index cf572aa277b..7d3fefb522d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.vsplit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.Tensor.vsplit.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.Tensor.vsplit - ### [torch.Tensor.vsplit](https://pytorch.org/docs/stable/generated/torch.Tensor.vsplit.html) - ```python torch.Tensor.vsplit(split_size_or_sections) ``` ### [paddle.Tensor.vsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#vsplit-num_or_indices-name-none) - ```python paddle.Tensor.vsplit(num_or_indices, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.vsplit(num_or_indices, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | split_size_or_sections | num_or_indices | 表示分割的数量或索引,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.abs_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.abs_.md index a4d397d7e0f..923ed75c4f5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.abs_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.abs_.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.abs_ - +## [ 仅参数名不一致 ]torch.abs_ ### [torch.abs_](https://pytorch.org/docs/stable/jit_builtin_functions.html#supported-tensor-methods) - ```python torch.abs_(input) ``` ### [paddle.abs_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/abs_cn.html) - ```python paddle.abs_(x) ``` @@ -15,7 +12,6 @@ paddle.abs_(x) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.allclose.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.allclose.md index 0bcf1c066f4..3e9bf3685e4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.allclose.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.allclose.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.allclose - ### [torch.allclose](https://pytorch.org/docs/stable/generated/torch.allclose.html?highlight=allclose#torch.allclose) - ```python torch.allclose(input, other, @@ -11,7 +9,6 @@ torch.allclose(input, ``` ### [paddle.allclose](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/allclose_cn.html#allclose) - ```python paddle.allclose(x, y, @@ -24,7 +21,6 @@ paddle.allclose(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.as_strided.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.as_strided.md index 83fa5a288b5..0ec080155fa 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.as_strided.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.as_strided.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.as_strided ### [torch.as_strided](https://pytorch.org/docs/stable/generated/torch.as_strided.html?highlight=as_strided#torch.as_strided) - ```python torch.as_strided(input, size, @@ -9,7 +8,6 @@ torch.as_strided(input, ``` ### [paddle.as_strided](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/as_strided_cn.html#as-strided) - ```python paddle.as_strided(x, shape, @@ -20,7 +18,6 @@ paddle.as_strided(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor, 仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.autograd.function.FunctionCtx.mark_non_differentiable.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.autograd.function.FunctionCtx.mark_non_differentiable.md index 7d1cba81418..34446343e8a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.autograd.function.FunctionCtx.mark_non_differentiable.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.autograd.function.FunctionCtx.mark_non_differentiable.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.autograd.function.FunctionCtx.mark_non_differentiable - +## [ 仅参数名不一致 ]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) ``` ### [paddle.autograd.PyLayerContext.mark_non_differentiable](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/autograd/PyLayerContext_cn.html#mark-non-differentiable-self-tensors) - ```python paddle.autograd.PyLayerContext.mark_non_differentiable(*tensors) ``` @@ -15,7 +12,6 @@ paddle.autograd.PyLayerContext.mark_non_differentiable(*tensors) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | args | tensors | 需要标记不需要反向的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bincount.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bincount.md index 72185b6436b..457a9dffacd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bincount.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bincount.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.bincount - ### [torch.bincount](https://pytorch.org/docs/stable/generated/torch.bincount.html?highlight=bincount#torch.bincount) - ```python torch.bincount(input, weights=None, @@ -9,7 +7,6 @@ torch.bincount(input, ``` ### [paddle.bincount](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/bincount_cn.html#bincount) - ```python paddle.bincount(x, weights=None, @@ -19,7 +16,6 @@ paddle.bincount(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input| x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_and.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_and.md index 0a08bf649b8..9a477a0df48 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_and.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_and.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.bitwise_and - ### [torch.bitwise_and](https://pytorch.org/docs/stable/generated/torch.bitwise_and.html#torch.bitwise_and) - ```python torch.bitwise_and(input, other, @@ -10,7 +8,6 @@ torch.bitwise_and(input, ``` ### [paddle.bitwise_and](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/bitwise_and_cn.html#bitwise-and) - ```python paddle.bitwise_and(x, y, @@ -20,7 +17,6 @@ paddle.bitwise_and(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_not.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_not.md index 8f600d81f6b..b6939b03b11 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_not.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_not.md @@ -1,7 +1,5 @@ -## [ 仅参数名不一致 ] torch.bitwise_not - +## [ 仅参数名不一致 ]torch.bitwise_not ### [torch.bitwise_not](https://pytorch.org/docs/stable/generated/torch.bitwise_not.html?highlight=bitwise_not#torch.bitwise_not) - ```python torch.bitwise_not(input, *, @@ -9,7 +7,6 @@ torch.bitwise_not(input, ``` ### [paddle.bitwise_not](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/bitwise_not_cn.html) - ```python paddle.bitwise_not(x, out=None, @@ -19,7 +16,6 @@ paddle.bitwise_not(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_or.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_or.md index 4321096b8b5..a3550a835b9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_or.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_or.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.bitwise_or - ### [torch.bitwise_or](https://pytorch.org/docs/stable/generated/torch.bitwise_or.html#torch-bitwise-or) - ```python torch.bitwise_or(input, other, @@ -10,7 +8,6 @@ torch.bitwise_or(input, ``` ### [paddle.bitwise_or](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/bitwise_or_cn.html#bitwise-or) - ```python paddle.bitwise_or(x, y, @@ -20,7 +17,6 @@ paddle.bitwise_or(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_xor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_xor.md index a025bf021c8..9372962693a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_xor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.bitwise_xor.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.bitwise_xor - ### [torch.bitwise_xor](https://pytorch.org/docs/stable/generated/torch.bitwise_xor.html) - ```python torch.bitwise_xor(input, other, @@ -10,7 +8,6 @@ torch.bitwise_xor(input, ``` ### [paddle.bitwise_xor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/bitwise_xor_cn.html) - ```python paddle.bitwise_xor(x, y, @@ -20,7 +17,6 @@ paddle.bitwise_xor(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cdist.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cdist.md index a28c8faaf60..1b08cf97d26 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cdist.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cdist.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.cdist - ### [torch.cdist](https://pytorch.org/docs/stable/generated/torch.cdist.html#torch.cdist) - ```python torch.cdist(x1, x2, p=2.0, compute_mode='use_mm_for_euclid_dist_if_necessary') ``` ### [paddle.cdist](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cdist_cn.html#cdist) - ```python paddle.cdist(x, y, p=2.0, compute_mode='use_mm_for_euclid_dist_if_necessary', name=None) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | x1 | x | 表示第一个输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.celu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.celu.md index 18569825838..99e22f5d2bd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.celu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.celu.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.celu - ### [torch.celu](https://pytorch.org/docs/stable/generated/torch.nn.functional.celu.html#torch.nn.functional.celu) - ```python torch.celu(input, alpha=1.0) ``` ### [paddle.nn.functional.celu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/celu_cn.html#celu) - ```python paddle.nn.functional.celu(x, alpha=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.celu(x, alpha=1.0, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cholesky_solve.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cholesky_solve.md index cf97679b907..3b50e574794 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cholesky_solve.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cholesky_solve.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.cholesky_solve - +## [ 仅参数名不一致 ]torch.cholesky_solve ### [torch.cholesky_solve](https://pytorch.org/docs/stable/generated/torch.cholesky_solve.html?highlight=cholesky#torch.cholesky_solve) - ```python torch.cholesky_solve(input, input2, upper=False, *, out=None) ``` ### [paddle.linalg.cholesky_solve](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/cholesky_solve_cn.html#cholesky-solve) - ```python paddle.linalg.cholesky_solve(x, y, upper=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.cholesky_solve(x, y, upper=False, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下:: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------------------------------------- | | input | x | 表示线性方程中的 B 矩阵。仅参数名不一致 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.combinations.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.combinations.md index ac28fe92a25..e7057bed151 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.combinations.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.combinations.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.combinations - ### [torch.combinations](https://pytorch.org/docs/stable/generated/torch.combinations.html#torch.combinations) - ```python torch.combinations(input, r=2, with_replacement=False) ``` ### [paddle.combinations](https://github.com/PaddlePaddle/Paddle/blob/8932f1c5e26788ab1eed226e70fafb1ea67ce737/python/paddle/tensor/math.py#L7099) - ```python paddle.combinations(x, r=2, with_replacement=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.combinations(x, r=2, with_replacement=False, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------------- | ---------------- | ----------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.conj.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.conj.md index 1f96bf6a9bf..339f4ec99f2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.conj.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.conj.md @@ -1,12 +1,10 @@ -## [仅参数名不一致]torch.conj +## [ 仅参数名不一致 ]torch.conj ### [torch.conj](https://pytorch.org/docs/stable/generated/torch.conj.html?highlight=conj#torch.conj) - ```python torch.conj(input) ``` ### [paddle.conj](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/conj_cn.html#conj) - ```python paddle.conj(x, name=None) @@ -14,7 +12,6 @@ paddle.conj(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.corrcoef.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.corrcoef.md index 569c65d91bc..4ea4f1e6a8a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.corrcoef.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.corrcoef.md @@ -1,12 +1,10 @@ -## [仅参数名不一致]torch.corrcoef +## [ 仅参数名不一致 ]torch.corrcoef ### [torch.corrcoef](https://pytorch.org/docs/stable/generated/torch.corrcoef.html?highlight=corrcoef#torch.corrcoef) - ```python torch.corrcoef(input) ``` ### [paddle.linalg.corrcoef](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/corrcoef_cn.html#corrcoef) - ```python paddle.linalg.corrcoef(x, rowvar=True, @@ -15,7 +13,6 @@ paddle.linalg.corrcoef(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 一个 N(N<=2) 维矩阵,包含多个变量。默认矩阵的每行是一个观测变量,由参数 rowvar 设置。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cuda.nvtx.range_push.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cuda.nvtx.range_push.md index 2afa7957f9a..b68c639fc92 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cuda.nvtx.range_push.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cuda.nvtx.range_push.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.cuda.nvtx.range_push - ### [torch.cuda.nvtx.range_push](https://pytorch.org/docs/stable/generated/torch.cuda.nvtx.range_push.html?highlight=range_push#torch.cuda.nvtx.range_push) - ```python torch.cuda.nvtx.range_push(msg) ``` ### [paddle.framework.core.nvprof_nvtx_push](https://github.com/PaddlePaddle/Paddle/blob/645dfb4040a15712cea9ccfed4dcb0655aeeb0ea/paddle/fluid/pybind/pybind.cc#L2465) - ```python paddle.framework.core.nvprof_nvtx_push(arg0) ``` @@ -15,7 +12,6 @@ paddle.framework.core.nvprof_nvtx_push(arg0) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------ | | msg | arg0 | 关联 range 的 ASCII 消息,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cumulative_trapezoid.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cumulative_trapezoid.md index 4c2010fe658..1d98968e644 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cumulative_trapezoid.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.cumulative_trapezoid.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.cumulative_trapezoid - +## [ 仅参数名不一致 ]torch.cumulative_trapezoid ### [torch.cumulative_trapezoid](https://pytorch.org/docs/stable/generated/torch.cumulative_trapezoid.html#torch.cumulative_trapezoid) - ```python torch.cumulative_trapezoid(y, x=None, *, dx=None, dim=-1) ``` ### [paddle.cumulative_trapezoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cumulative_trapezoid_cn.html) - ```python paddle.cumulative_trapezoid(y, x=None, dx=None, axis=-1, name=None) ``` @@ -15,7 +12,6 @@ paddle.cumulative_trapezoid(y, x=None, dx=None, axis=-1, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------- | | y | y | 输入多维 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.det.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.det.md index a9552a7db5b..b250ff5bbe1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.det.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.det.md @@ -1,19 +1,16 @@ ## [ 仅参数名不一致 ]torch.det ### [torch.det](https://pytorch.org/docs/stable/generated/torch.det.html?highlight=det#torch.det) - ```python torch.det(input) ``` ### [paddle.linalg.det](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/det_cn.html#det) - ```python paddle.linalg.det(x) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagflat.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagflat.md index 8faa700bfa4..867458ee3cd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagflat.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagflat.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.diagflat ### [torch.diagflat](https://pytorch.org/docs/stable/generated/torch.diagflat.html?highlight=diagflat#torch.diagflat) - ```python torch.diagflat(input, offset=0) ``` ### [paddle.diagflat](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/diagflat_cn.html#diagflat) - ```python paddle.diagflat(x, offset=0, @@ -16,7 +14,6 @@ paddle.diagflat(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagonal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagonal.md index 5e04a9a6e9f..04a506dec4c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagonal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagonal.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.diagonal ### [torch.diagonal](https://pytorch.org/docs/stable/generated/torch.diagonal.html?highlight=diagonal#torch.diagonal) - ```python torch.diagonal(input, offset=0, @@ -9,7 +8,6 @@ torch.diagonal(input, ``` ### [paddle.diagonal](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/diagonal_cn.html#diagonal) - ```python paddle.diagonal(x, offset=0, @@ -20,7 +18,6 @@ paddle.diagonal(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagonal_scatter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagonal_scatter.md index f3c8a0d3879..51f8d769b29 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagonal_scatter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.diagonal_scatter.md @@ -1,7 +1,5 @@ -## [ 仅参数名不一致 ] torch.diagonal_scatter - +## [ 仅参数名不一致 ]torch.diagonal_scatter ### [torch.diagonal_scatter](https://pytorch.org/docs/stable/generated/torch.diagonal_scatter.html?highlight=diagonal_scatter#torch.diagonal_scatter) - ```python torch.diagonal_scatter(input, src, @@ -11,7 +9,6 @@ torch.diagonal_scatter(input, ``` ### [paddle.diagonal_scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/diagonal_scatter_cn.html) - ```python paddle.diagonal_scatter(x, y, @@ -23,7 +20,6 @@ paddle.diagonal_scatter(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |---------|--------------| -------------------------------------------------- | | input | x | 输入张量,被嵌入的张量,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dist.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dist.md index 885727efd85..cee43acf758 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dist.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dist.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.dist ### [torch.dist](https://pytorch.org/docs/stable/generated/torch.dist.html?highlight=dist#torch.dist) - ```python torch.dist(input, other, @@ -8,7 +7,6 @@ torch.dist(input, ``` ### [paddle.dist](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/dist_cn.html#dist) - ```python paddle.dist(x, y, @@ -17,7 +15,6 @@ paddle.dist(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.rpc.get_worker_info.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.rpc.get_worker_info.md index 7a863de43c3..043edc4e7df 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.rpc.get_worker_info.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.rpc.get_worker_info.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.distributed.rpc.get_worker_info - +## [ 仅参数名不一致 ]torch.distributed.rpc.get_worker_info ### [torch.distributed.rpc.get_worker_info](https://pytorch.org/docs/stable/rpc.html#torch.distributed.rpc.get_worker_info) - ```python torch.distributed.rpc.get_worker_info(worker_name=None) ``` ### [paddle.distributed.rpc.get_worker_info](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/rpc/get_worker_info_cn.html#cn-api-distributed-rpc-get-worker-info) - ```python paddle.distributed.rpc.get_worker_info(name) ``` @@ -15,7 +12,6 @@ paddle.distributed.rpc.get_worker_info(name) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | ------------------------------- | | worker_name | name | worker 的名字,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.rpc.remote.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.rpc.remote.md index 6841f0dec9f..af6e9b0ac45 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.rpc.remote.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.rpc.remote.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.distributed.rpc.remote - ### [torch.distributed.rpc.remote](https://pytorch.org/docs/stable/rpc.html#torch.distributed.rpc.remote) - ```python torch.distributed.rpc.remote(to, func, args=None, kwargs=None, timeout=-1.0) ``` ### [paddle.distributed.rpc.rpc_async](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/rpc/rpc_async_cn.html#rpc-async) - ```python paddle.distributed.rpc.rpc_async(to, fn, args=None, kwargs=None, timeout=-1) ``` @@ -16,7 +13,6 @@ paddle.distributed.rpc.rpc_async(to, fn, args=None, kwargs=None, timeout=-1) ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------- | | to | to | 目标 worker 的名字。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.scatter_object_list.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.scatter_object_list.md index 2fd1ffc3413..49ade7415b2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.scatter_object_list.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributed.scatter_object_list.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.distributed.scatter_object_list - +## [ 仅参数名不一致 ]torch.distributed.scatter_object_list ### [torch.distributed.scatter_object_list](https://pytorch.org/docs/stable/distributed.html#torch.distributed.scatter_object_list) - ```python torch.distributed.scatter_object_list(scatter_object_output_list, scatter_object_input_list, src=0, group=None) ``` ### [paddle.distributed.scatter_object_list](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/scatter_object_list_cn.html#scatter-object-list) - ```python paddle.distributed.scatter_object_list(out_object_list, in_object_list, src=0, group=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.scatter_object_list(out_object_list, in_object_list, src=0, g 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------------------- | --------------- | -------------------------------------------- | | scatter_object_output_list | out_object_list | 用于接收数据的 object 列表,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.distribution.Distribution.rsample.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.distribution.Distribution.rsample.md index ef29808524f..aa36f485aa9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.distribution.Distribution.rsample.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.distribution.Distribution.rsample.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.distributions.distribution.Distribution.rsample - ### [torch.distributions.distribution.Distribution.rsample](https://pytorch.org/docs/stable/distributions.html#torch.distributions.distribution.Distribution.rsample) - ```python torch.distributions.distribution.Distribution.rsample(sample_shape=torch.Size([])) ``` ### [paddle.distribution.Distribution.rsample](https://github.com/PaddlePaddle/Paddle/blob/2bbd6f84c1db3e7401732869ee50aef2d9c97bdc/python/paddle/distribution/distribution.py#L96) - ```python paddle.distribution.Distribution.rsample(shape=()) ``` @@ -15,7 +12,6 @@ paddle.distribution.Distribution.rsample(shape=()) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ---- | | sample_shape | shape | 重参数化的样本形状,仅参数名不同。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.distribution.Distribution.sample.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.distribution.Distribution.sample.md index f693e0a45d6..58326b1d4a2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.distribution.Distribution.sample.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.distribution.Distribution.sample.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.distributions.distribution.Distribution.sample - ### [torch.distributions.distribution.Distribution.sample](https://pytorch.org/docs/stable/distributions.html#torch.distributions.distribution.Distribution.sample) - ```python torch.distributions.distribution.Distribution.sample(sample_shape=torch.Size([])) ``` ### [paddle.distribution.Distribution.sample](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Distribution_cn.html#sample) - ```python paddle.distribution.Distribution.sample(shape=()) ``` @@ -15,7 +12,6 @@ paddle.distribution.Distribution.sample(shape=()) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -- | | sample_shape | shape | 采样形状,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.kl.register_kl.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.kl.register_kl.md index a82b2c0c179..aab5b895a64 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.kl.register_kl.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.distributions.kl.register_kl.md @@ -1,20 +1,16 @@ -## [ 仅参数名不一致 ] torch.distributions.kl.register_kl - +## [ 仅参数名不一致 ]torch.distributions.kl.register_kl ### [torch.distributions.kl.register_kl](https://pytorch.org/docs/stable/distributions.html?highlight=register_kl#torch.distributions.kl.register_kl) - ```python torch.distributions.kl.register_kl(type_p, type_q) ``` ### [paddle.distribution.register_kl](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/register_kl_cn.html) - ```python paddle.distribution.register_kl(cls_p, cls_q) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | type_p | cls_p | 实例 p 的分布类型,继承于 Distribution 基类,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dropout.md index 82c3573e760..e22ffa55b4a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dropout.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.dropout - ### [torch.dropout](https://pytorch.org/docs/stable/jit_builtin_functions.html#supported-pytorch-functions) - ```python torch.dropout(input, p, @@ -9,7 +7,6 @@ torch.dropout(input, ``` ### [paddle.nn.functional.dropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/dropout_cn.html#dropout) - ```python paddle.nn.functional.dropout(x, p=0.5, axis=None, training=True, mode='upscale_in_train', name=None) ``` @@ -17,7 +14,6 @@ paddle.nn.functional.dropout(x, p=0.5, axis=None, training=True, mode='upscale_i 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | input | x | 输入的多维 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dsplit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dsplit.md index f74cce2b8f8..158f9039283 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dsplit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dsplit.md @@ -4,14 +4,12 @@ api 存在重载情况,分别如下: ------------------------------------------------------------------------------------------------- ### [torch.dsplit](https://pytorch.org/docs/stable/generated/torch.dsplit.html#torch.dsplit) - ```python torch.dsplit(input, sections) ``` ### [paddle.dsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/dsplit_cn.html) - ```python paddle.dsplit(x, num_or_indices, @@ -21,7 +19,6 @@ paddle.dsplit(x, 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入多维 Tensor ,仅参数名不一致。 | @@ -30,14 +27,12 @@ paddle.dsplit(x, ------------------------------------------------------------------------------------------------- ### [torch.dsplit](https://pytorch.org/docs/stable/generated/torch.dsplit.html#torch.dsplit) - ```python torch.dsplit(input, indices) ``` ### [paddle.dsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/dsplit_cn.html) - ```python paddle.dsplit(x, num_or_indices, @@ -47,7 +42,6 @@ paddle.dsplit(x, 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入多维 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dstack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dstack.md index 928e78d1153..b0270ab8318 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dstack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.dstack.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.dstack - ### [torch.dstack](https://pytorch.org/docs/stable/generated/torch.dstack.html#torch.dstack) - ```python torch.dstack(tensors, *, out=None) ``` ### [paddle.dstack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/dstack_cn.html) - ```python paddle.dstack(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.dstack(x, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.feature_alpha_dropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.feature_alpha_dropout.md index c162e63a5b1..bcf5c90f5ab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.feature_alpha_dropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.feature_alpha_dropout.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.feature_alpha_dropout - ### [torch.feature\_alpha\_dropout](https://pytorch.org/docs/stable/jit_builtin_functions.html) - ```python torch.feature_alpha_dropout(input, p, training) ``` ### [paddle.nn.functional.feature\_alpha\_dropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/feature_alpha_dropout_cn.html#feature_alpha-dropout) - ```python paddle.nn.functional.feature_alpha_dropout(x, p=0.5, training=True, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.feature_alpha_dropout(x, p=0.5, training=True, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -- | | input | x | 输入的多维 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.fft.fftshift.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.fft.fftshift.md index 87f45af527f..9000f2018ab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.fft.fftshift.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.fft.fftshift.md @@ -1,20 +1,16 @@ -## [ 仅参数名不一致 ] torch.fft.fftshift - +## [ 仅参数名不一致 ]torch.fft.fftshift ### [torch.fft.fftshift](https://pytorch.org/docs/stable/generated/torch.fft.fftshift.html#torch.fft.fftshift) - ```python torch.fft.fftshift(input, dim=None) ``` ### [paddle.fft.fftshift](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/fftshift_cn.html) - ```python paddle.fft.fftshift(x, axes=None, name=None) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.fft.ifftshift.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.fft.ifftshift.md index ead0ebdce3d..220c744b58c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.fft.ifftshift.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.fft.ifftshift.md @@ -1,20 +1,16 @@ -## [ 仅参数名不一致 ] torch.fft.ifftshift - +## [ 仅参数名不一致 ]torch.fft.ifftshift ### [torch.fft.ifftshift](https://pytorch.org/docs/stable/generated/torch.fft.ifftshift.html#torch.fft.ifftshift) - ```python torch.fft.ifftshift(input, dim=None) ``` ### [paddle.fft.ifftshift](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/ifftshift_cn.html) - ```python paddle.fft.ifftshift(x, axes=None, name=None) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.flip.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.flip.md index 519723eeaa6..576af6b0d6e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.flip.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.flip.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.flip ### [torch.flip](https://pytorch.org/docs/stable/generated/torch.flip.html?highlight=flip#torch.flip) - ```python torch.flip(input, dims) ``` ### [paddle.flip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/flip_cn.html#flip) - ```python paddle.flip(x, axis, @@ -16,7 +14,6 @@ paddle.flip(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.from_dlpack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.from_dlpack.md index a1c33d81db8..43d5aa86cf3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.from_dlpack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.from_dlpack.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.from_dlpack - ### [torch.from_dlpack](https://pytorch.org/docs/stable/generated/torch.from_dlpack.html?highlight=from_dlpack#torch.from_dlpack) - ```python torch.from_dlpack(ext_tensor) ``` ### [paddle.utils.dlpack.from_dlpack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/utils/dlpack/from_dlpack_cn.html) - ```python paddle.utils.dlpack.from_dlpack(dlpack) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | ext_tensor | dlpack | 表示输入的带有 dltensor 的 PyCapsule 对象,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.histogramdd.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.histogramdd.md index 35e9365802b..3d25b20ae2a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.histogramdd.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.histogramdd.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.histogramdd - +## [ 仅参数名不一致 ]torch.histogramdd ### [torch.histogramdd](https://pytorch.org/docs/stable/generated/torch.histogramdd.html#torch-histogramdd) - ```python torch.histogramdd(input, bins, *, range=None, weight=None, density=False) ``` ### [paddle.histogramdd](https://github.com/PaddlePaddle/Paddle/blob/a19227d9ee0e351363a4bb27b50b1becbec58a6c/python/paddle/tensor/linalg.py#L3875) - ```python paddle.histogramdd(x, bins=10, ranges=None, density=False, weights=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.histogramdd(x, bins=10, ranges=None, density=False, weights=None, name=No 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.hsplit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.hsplit.md index 770dce34f37..7ff71010690 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.hsplit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.hsplit.md @@ -4,14 +4,12 @@ api 存在重载情况,分别如下: ------------------------------------------------------------------------------------------------- ### [torch.hsplit](https://pytorch.org/docs/stable/generated/torch.hsplit.html#torch.hsplit) - ```python torch.hsplit(input,         sections) ``` ### [paddle.hsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hsplit_cn.html) - ```python paddle.hsplit(x,         num_or_indices, @@ -21,7 +19,6 @@ paddle.hsplit(x, 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch       | PaddlePaddle | 备注                                                   | | ------------- | ------------ | ------------------------------------------------------ | | input          |  x           | 输入多维 Tensor ,仅参数名不一致。  | @@ -30,14 +27,12 @@ paddle.hsplit(x, ------------------------------------------------------------------------------------------------- ### [torch.hsplit](https://pytorch.org/docs/stable/generated/torch.hsplit.html#torch.hsplit) - ```python torch.hsplit(input,         indices) ``` ### [paddle.hsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hsplit_cn.html) - ```python paddle.hsplit(x,         num_or_indices, @@ -47,7 +42,6 @@ paddle.hsplit(x, 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch       | PaddlePaddle | 备注                                                   | | ------------- | ------------ | ------------------------------------------------------ | | input          |  x           | 输入多维 Tensor ,仅参数名不一致。  | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.hstack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.hstack.md index 1526fe8b47d..fc95e298480 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.hstack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.hstack.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.hstack - ### [torch.hstack](https://pytorch.org/docs/stable/generated/torch.hstack.html#torch.hstack) - ```python torch.hstack(tensors, *, out=None) ``` ### [paddle.hstack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hstack_cn.html) - ```python paddle.hstack(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.hstack(x, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.iinfo.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.iinfo.md index fd2cbacd204..c9ebf439b6d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.iinfo.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.iinfo.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.iinfo - +## [ 仅参数名不一致 ]torch.iinfo ### [torch.iinfo](https://pytorch.org/docs/stable/type_info.html#torch-iinfo) - ```python torch.iinfo(type) ``` ### [paddle.iinfo](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/iinfo_cn.html) - ```python paddle.iinfo(dtype) ``` @@ -15,7 +12,6 @@ paddle.iinfo(dtype) paddle 参数和 torch 参数完全一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------- | | type | dtype | 输入的数据类型,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.imag.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.imag.md index d4783c1eda6..051e2e0d22c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.imag.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.imag.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.imag - ### [torch.imag](https://pytorch.org/docs/stable/generated/torch.imag.html?highlight=imag#torch.imag) - ```python torch.imag(input) ``` ### [paddle.imag](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/imag_cn.html#imag) - ```python paddle.imag(x) ``` @@ -15,7 +12,6 @@ paddle.imag(x) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.index_fill.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.index_fill.md index 73a184f60bb..50e1f06a785 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.index_fill.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.index_fill.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.index_fill - ### [torch.index_fill](https://pytorch.org/docs/stable/generated/torch.Tensor.index_fill.html#torch.Tensor.index_fill) - ```python torch.index_fill(input, dim, index, value) ``` ### [paddle.index_fill](https://github.com/PaddlePaddle/Paddle/blob/1e3761d119643af19cb6f8a031a77f315d782409/python/paddle/tensor/manipulation.py#L5900) - ```python paddle.index_fill(x, index, axis, value, name=None) ``` @@ -15,7 +12,6 @@ paddle.index_fill(x, index, axis, value, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.isclose.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.isclose.md index fd8c4a087cf..a769547758a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.isclose.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.isclose.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.isclose ### [torch.isclose](https://pytorch.org/docs/stable/generated/torch.isclose.html?highlight=isclose#torch.isclose) - ```python torch.isclose(input, other, @@ -10,7 +9,6 @@ torch.isclose(input, ``` ### [paddle.isclose](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/isclose_cn.html#isclose) - ```python paddle.isclose(x, y, @@ -22,7 +20,6 @@ paddle.isclose(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.isreal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.isreal.md index 57cd94bbf68..a7db0138723 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.isreal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.isreal.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.isreal - +## [ 仅参数名不一致 ]torch.isreal ### [torch.isreal](https://pytorch.org/docs/stable/generated/torch.isreal.html#torch-isreal) - ```python torch.isreal(input) ``` ### [paddle.isreal](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/isreal_cn.html) - ```python paddle.isreal(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.isreal(x, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.istft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.istft.md index fed6c2e81b4..1453dba7a6f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.istft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.istft.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.istft ### [torch.istft](https://pytorch.org/docs/stable/generated/torch.istft.html?highlight=istft#torch.istft) - ```python torch.istft(input, n_fft, @@ -15,7 +14,6 @@ torch.istft(input, ``` ### [paddle.signal.istft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/signal/istft_cn.html#istft) - ```python paddle.signal.istft(x, n_fft, @@ -32,7 +30,6 @@ paddle.signal.istft(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.kron.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.kron.md index 7bea3473a3f..72b89f9c899 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.kron.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.kron.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.kron - +## [ 仅参数名不一致 ]torch.kron ### [torch.kron](https://pytorch.org/docs/stable/generated/torch.kron.html#torch-kron) - ```python torch.kron(input, other, *, out=None) ``` ### [paddle.kron](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/kron_cn.html#kron) - ```python paddle.kron(x, y, out=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.kron(x, y, out=None, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------- | | input | x | 表示 Kron OP 输入的第一个 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.kthvalue.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.kthvalue.md index 14bbf388606..c218d5cb2fd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.kthvalue.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.kthvalue.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.kthvalue ### [torch.kthvalue](https://pytorch.org/docs/stable/generated/torch.kthvalue.html?highlight=kthvalue#torch.kthvalue) - ```python torch.kthvalue(input, k, @@ -11,7 +10,6 @@ torch.kthvalue(input, ``` ### [paddle.kthvalue](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/kthvalue_cn.html) - ```python paddle.kthvalue(x, k, @@ -23,7 +21,6 @@ paddle.kthvalue(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -31,15 +28,3 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | dim | axis | 指定对输入 Tensor 进行运算的轴,仅参数名不一致。 | | keepdim | keepdim | 是否在输出 Tensor 中保留减小的维度。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写 。 | - -### 转写示例 - -#### out:指定输出 -```python -# PyTorch 写法 -torch.kthvalue(x, 2, 1, out=y) - -# Paddle 写法 -out0, out1 = paddle.kthvalue(x, 2, 1) -paddle.assign(out0, y[0]), paddle.assign(out1, y[1]) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.linalg.lstsq.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.linalg.lstsq.md index d91a4fe8ba2..5ba333036e0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.linalg.lstsq.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.linalg.lstsq.md @@ -1,19 +1,16 @@ ## [ 仅参数名不一致 ]torch.linalg.lstsq ### [torch.linalg.lstsq](https://pytorch.org/docs/stable/generated/torch.linalg.lstsq.html?highlight=lstsq#torch.linalg.lstsq) - ```python torch.linalg.lstsq(input, b, rcond=None, *, driver=None) ``` ### [paddle.linalg.lstsq](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/lstsq_cn.html) - ```python paddle.linalg.lstsq(x, y, rcond=None, driver=None, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.linalg.matrix_exp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.linalg.matrix_exp.md index 6e5dc17ccff..beda0ee24f8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.linalg.matrix_exp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.linalg.matrix_exp.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.linalg.matrix_exp ### [torch.linalg.matrix_exp](https://pytorch.org/docs/stable/generated/torch.linalg.matrix_exp.html#torch.linalg.matrix_exp) - ```python torch.linalg.matrix_exp(A) ``` ### [paddle.linalg.matrix_exp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/matrix_exp_cn.html) - ```python paddle.linalg.matrix_exp(x, name=None) ``` @@ -14,7 +12,6 @@ paddle.linalg.matrix_exp(x, name=None) PyTorch 相比 Paddle 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | A | x | 输入的方阵,类型为 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.masked_fill.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.masked_fill.md index 198fec04de1..6db7f6f3aa4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.masked_fill.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.masked_fill.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.masked_fill - +## [ 仅参数名不一致 ]torch.masked_fill ### [torch.masked_fill](https://pytorch.org/docs/stable/generated/torch.Tensor.masked_fill.html#torch.Tensor.masked_fill) - ```python torch.masked_fill(input, mask, value) ``` ### [paddle.masked_fill](https://github.com/PaddlePaddle/Paddle/blob/1e3761d119643af19cb6f8a031a77f315d782409/python/paddle/tensor/manipulation.py#L5111) - ```python paddle.masked_fill(x, mask, value, name=None) ``` @@ -15,7 +12,6 @@ paddle.masked_fill(x, mask, value, name=None) 两者功能一致,参数完全一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.max_pool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.max_pool3d.md index 0b89c960240..c24f08adaf4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.max_pool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.max_pool3d.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.max_pool3d - ### [torch.max\_pool3d](https://pytorch.org/docs/stable/jit_builtin_functions.html#supported-pytorch-functions) - ```python torch.max_pool3d(input, kernel_size, stride=[], padding=[0, 0, 0], dilation=[1, 1, 1], ceil_mode=False) ``` ### [paddle.nn.functional.max_pool3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_pool3d_cn.html) - ```python paddle.nn.functional.max_pool3d(x, kernel_size, stride=None, padding=0, ceil_mode=False, return_mask=False, data_format="NCDHW", name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.max_pool3d(x, kernel_size, stride=None, padding=0, ceil_mod PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.moveaxis.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.moveaxis.md index 791f704323c..9ff0340994f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.moveaxis.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.moveaxis.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.moveaxis ### [torch.moveaxis](https://pytorch.org/docs/stable/generated/torch.moveaxis.html?highlight=moveaxis#torch.moveaxis) - ```python torch.moveaxis(input, source, @@ -8,7 +7,6 @@ torch.moveaxis(input, ``` ### [paddle.moveaxis](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/moveaxis_cn.html#moveaxis) - ```python paddle.moveaxis(x, source, @@ -18,7 +16,6 @@ paddle.moveaxis(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.movedim.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.movedim.md index 2fec1dc85f2..625d60795cc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.movedim.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.movedim.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.movedim ### [torch.movedim](https://pytorch.org/docs/stable/generated/torch.movedim.html?highlight=movedim#torch.movedim) - ```python torch.movedim(input, source, @@ -8,7 +7,6 @@ torch.movedim(input, ``` ### [paddle.moveaxis](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/moveaxis_cn.html#moveaxis) - ```python paddle.moveaxis(x, source, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool1d.md index 06ebda32596..0c014cf3dc0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool1d.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.nn.AdaptiveMaxPool1d ### [torch.nn.AdaptiveMaxPool1d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveMaxPool1d.html?highlight=adaptivemaxpool1d#torch.nn.AdaptiveMaxPool1d) - ```python torch.nn.AdaptiveMaxPool1d(output_size, return_indices=False) ``` ### [paddle.nn.AdaptiveMaxPool1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/AdaptiveMaxPool1D_cn.html#adaptivemaxpool1d) - ```python paddle.nn.AdaptiveMaxPool1D(output_size, return_mask=False, @@ -16,7 +14,6 @@ paddle.nn.AdaptiveMaxPool1D(output_size, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | output_size | output_size | 表示输出 Tensor 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool2d.md index 1fd40b4fbf1..ed89d936a93 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool2d.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.nn.AdaptiveMaxPool2d ### [torch.nn.AdaptiveMaxPool2d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveMaxPool2d.html?highlight=adaptivemaxpool2d#torch.nn.AdaptiveMaxPool2d) - ```python torch.nn.AdaptiveMaxPool2d(output_size, return_indices=False) ``` ### [paddle.nn.AdaptiveMaxPool2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/AdaptiveMaxPool2D_cn.html#adaptivemaxpool2d) - ```python paddle.nn.AdaptiveMaxPool2D(output_size, return_mask=False, @@ -16,7 +14,6 @@ paddle.nn.AdaptiveMaxPool2D(output_size, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | output_size | output_size | 表示输出 Tensor 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool3d.md index 3e81f24a6d3..7ddbab6e825 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.AdaptiveMaxPool3d.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.nn.AdaptiveMaxPool3d ### [torch.nn.AdaptiveMaxPool3d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveMaxPool3d.html?highlight=adaptivemaxpool3d#torch.nn.AdaptiveMaxPool3d) - ```python torch.nn.AdaptiveMaxPool3d(output_size, return_indices=False) ``` ### [paddle.nn.AdaptiveMaxPool3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/AdaptiveMaxPool3D_cn.html#adaptivemaxpool3d) - ```python paddle.nn.AdaptiveMaxPool3D(output_size, return_mask=False, @@ -16,7 +14,6 @@ paddle.nn.AdaptiveMaxPool3D(output_size, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | output_size | output_size | 表示输出 Tensor 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.CosineSimilarity.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.CosineSimilarity.md index 987a49d45c2..690d89b2e0d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.CosineSimilarity.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.CosineSimilarity.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.nn.CosineSimilarity ### [torch.nn.CosineSimilarity](https://pytorch.org/docs/stable/generated/torch.nn.CosineSimilarity.html?highlight=nn+cosinesimilarity#torch.nn.CosineSimilarity) - ```python torch.nn.CosineSimilarity(dim=1, eps=1e-08) ``` ### [paddle.nn.CosineSimilarity](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/CosineSimilarity_cn.html#cosinesimilarity) - ```python paddle.nn.CosineSimilarity(axis=1, eps=1e-8) @@ -15,7 +13,6 @@ paddle.nn.CosineSimilarity(axis=1, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 指定计算的维度,会在该维度上计算余弦相似度,默认值为 1。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Flatten.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Flatten.md index 174f177c46f..e55e48c782c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Flatten.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Flatten.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.nn.Flatten ### [torch.nn.Flatten](https://pytorch.org/docs/stable/generated/torch.nn.Flatten.html?highlight=nn+flatten#torch.nn.Flatten) - ```python torch.nn.Flatten(start_dim=1, end_dim=-1) ``` ### [paddle.nn.Flatten](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Flatten_cn.html#flatten) - ```python paddle.nn.Flatten(start_axis=1, stop_axis=-1) @@ -15,7 +13,6 @@ paddle.nn.Flatten(start_axis=1, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | start_dim | start_axis | 展开的起始维度,默认值为 1。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Fold.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Fold.md index 970d40819a7..56dc6339ab2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Fold.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Fold.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.Fold ### [torch.nn.Fold](https://pytorch.org/docs/stable/generated/torch.nn.Fold.html?highlight=nn+fold#torch.nn.Fold) - ```python torch.nn.Fold(output_size, kernel_size, @@ -10,7 +9,6 @@ torch.nn.Fold(output_size, ``` ### [paddle.nn.Fold](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Fold_cn.html#fold) - ```python paddle.nn.Fold(output_sizes, kernel_sizes, @@ -22,7 +20,6 @@ paddle.nn.Fold(output_sizes, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | output_size | output_sizes | 输出尺寸,整数或者整型列表。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.GLU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.GLU.md index 4f5b440af70..436201ae22a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.GLU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.GLU.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.GLU - +## [ 仅参数名不一致 ]torch.nn.GLU ### [torch.nn.GLU](https://pytorch.org/docs/stable/generated/torch.nn.GLU.html#torch.nn.GLU) - ```python torch.nn.GLU(dim=-1) ``` ### [paddle.nn.GLU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/GLU_cn.html) - ```python paddle.nn.GLU(axis=-1, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.GLU(axis=-1, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | dim | axis | GLU 划分输入的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.GaussianNLLLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.GaussianNLLLoss.md index eedfd169408..a9e80ece43d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.GaussianNLLLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.GaussianNLLLoss.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.GaussianNLLLoss - +## [ 仅参数名不一致 ]torch.nn.GaussianNLLLoss ### [torch.nn.GaussianNLLLoss](https://pytorch.org/docs/stable/generated/torch.nn.GaussianNLLLoss) - ```python torch.nn.GaussianNLLLoss(*, full=False, eps=1e-06, reduction='mean') ``` ### [paddle.nn.GaussianNLLLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/GaussianNLLLoss_cn.html) - ```python paddle.nn.GaussianNLLLoss(full=False, epsilon=1e-6, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.GaussianNLLLoss(full=False, epsilon=1e-6, reduction='mean', name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------ | ------------------ | ---------------------------------------------------------------------------------- | | full | full | 是否在损失计算中包括常数项。默认情况下为 False,表示忽略最后的常数项。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Hardshrink.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Hardshrink.md index d34da516022..94dd293182c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Hardshrink.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Hardshrink.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.Hardshrink ### [torch.nn.Hardshrink](https://pytorch.org/docs/stable/generated/torch.nn.Hardshrink.html?highlight=hardshrink#torch.nn.Hardshrink) - ```python torch.nn.Hardshrink(lambd=0.5) ``` ### [paddle.nn.Hardshrink](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Hardshrink_cn.html#hardshrink) - ```python paddle.nn.Hardshrink(threshold=0.5, name=None) @@ -14,7 +12,6 @@ paddle.nn.Hardshrink(threshold=0.5, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | lambd | threshold | Hardshrink 激活计算公式中的阈值,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.LogSoftmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.LogSoftmax.md index 6748fd4e989..180947ee8d0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.LogSoftmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.LogSoftmax.md @@ -1,18 +1,15 @@ ## [ 仅参数名不一致 ]torch.nn.LogSoftmax ### [torch.nn.LogSoftmax](https://pytorch.org/docs/stable/generated/torch.nn.LogSoftmax.html?highlight=nn+logsoftmax#torch.nn.LogSoftmax) - ```python torch.nn.LogSoftmax(dim=None) ``` ### [paddle.nn.LogSoftmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/LogSoftmax_cn.html#logsoftmax) - ```python paddle.nn.LogSoftmax(axis=- 1, name=None) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 指定对输入 Tensor 进行运算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.add_module.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.add_module.md index 862715c6c0d..8ec977e0d83 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.add_module.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.add_module.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.Module.add_module - ### [torch.nn.Module.add_module](https://pytorch.org/docs/stable/generated/torch.nn.Module.html?highlight=torch+nn+module+add_module#torch.nn.Module.add_module) - ```python torch.nn.Module.add_module(name, module) ``` ### [paddle.nn.Layer.add_sublayer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#add-sublayer-name-sublayer) - ```python paddle.nn.Layer.add_sublayer(name, sublayer) ``` @@ -15,7 +12,6 @@ paddle.nn.Layer.add_sublayer(name, sublayer) 两者功能一致,仅参数名不一致。 ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----- | ----- | ------------------------------------------ | | name | name | 表示子层名。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.buffers.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.buffers.md index d2be39058e6..43b39283e64 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.buffers.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.buffers.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.Module.buffers - ### [torch.nn.Module.buffers](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.buffers) - ```python torch.nn.Module.buffers(recurse=True) ``` ### [paddle.nn.Layer.buffers](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#buffers-include-sublayers-true) - ```python paddle.nn.Layer.buffers(include_sublayers=True) ``` @@ -15,7 +12,6 @@ paddle.nn.Layer.buffers(include_sublayers=True) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | recurse | include_sublayers | 表示是否返回子层的 buffers ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.named_buffers.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.named_buffers.md index 2cca04d4082..a51c07f6c8f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.named_buffers.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.named_buffers.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.Module.named_buffers - +## [ 仅参数名不一致 ]torch.nn.Module.named_buffers ### [torch.nn.Module.named_buffers](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.named_buffers) - ```python torch.nn.Module.named_buffers(prefix='', recurse=True, remove_duplicate=True) ``` ### [paddle.nn.Layer.named_buffers](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#named-buffers-prefix-include-sublayers-true) - ```python paddle.nn.Layer.named_buffers(prefix='', include_sublayers=True, remove_duplicate=True) ``` @@ -15,7 +12,6 @@ paddle.nn.Layer.named_buffers(prefix='', include_sublayers=True, remove_duplicat 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------- | | prefix | prefix | 在所有参数名称前加的前缀。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.named_parameters.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.named_parameters.md index e7af6286449..f0ff44870cf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.named_parameters.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.named_parameters.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.Module.named_parameters - +## [ 仅参数名不一致 ]torch.nn.Module.named_parameters ### [torch.nn.Module.named_parameters](https://pytorch.org/docs/stable/generated/torch.nn.Module.html?highlight=torch+nn+module+named_parameters#torch.nn.Module.named_parameters) - ```python torch.nn.Module.named_parameters(prefix='', recurse=True, remove_duplicate=True) ``` ### [paddle.nn.Layer.named_parameters](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#named-parameters-prefix-include-sublayers-true) - ```python paddle.nn.Layer.named_parameters(prefix='', include_sublayers=True, remove_duplicate=True) ``` @@ -15,7 +12,6 @@ paddle.nn.Layer.named_parameters(prefix='', include_sublayers=True, remove_dupli 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------- | | prefix | prefix | 在所有参数名称前加的前缀。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.parameters.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.parameters.md index 0b0c741a311..0ca0e763c7d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.parameters.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.parameters.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.Module.parameters ### [torch.nn.Module.parameters](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.parameters) - ```python torch.nn.Module.parameters(recurse=True) ``` ### [paddle.nn.Layer.parameters](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#parameters-include-sublayers-true) - ```python paddle.nn.Layer.parameters(include_sublayers=True) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_buffer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_buffer.md index bc38fa93eeb..b6376fed998 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_buffer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_buffer.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.Module.register_buffer ### [torch.nn.Module.register_buffer](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.register_buffer) - ```python torch.nn.Module.register_buffer(name, tensor, persistent=True) ``` ### [paddle.nn.Layer.register_buffer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#register-buffer-name-tensor-persistable-true) - ```python paddle.nn.Layer.register_buffer(name, tensor, persistable=True) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_module.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_module.md index b52be1a2294..5ef9e6775ec 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_module.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_module.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.Module.register_module ### [torch.nn.Module.register_module](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.register_module) - ```python torch.nn.Module.register_module(name, module) ``` ### [paddle.nn.Layer.add_sublayer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#add-sublayer-name-sublayer) - ```python paddle.nn.Layer.add_sublayer(name, sublayer) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_parameter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_parameter.md index 3b4bee98567..e7184bfbcf6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_parameter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Module.register_parameter.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.Module.register_parameter - +## [ 仅参数名不一致 ]torch.nn.Module.register_parameter ### [torch.nn.Module.register_parameter](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.register_parameter) - ```python torch.nn.Module.register_parameter(name, param) ``` ### [paddle.nn.Layer.add_parameter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#add-parameter-name-parameter) - ```python paddle.nn.Layer.add_parameter(name, parameter) ``` @@ -15,7 +12,6 @@ paddle.nn.Layer.add_parameter(name, parameter) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------- | | name | name | 参数名。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ModuleDict.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ModuleDict.md index 5bb01a20047..40e0dc15086 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ModuleDict.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ModuleDict.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.ModuleDict - ### [torch.nn.ModuleDict](https://pytorch.org/docs/stable/generated/torch.nn.ModuleDict.html?highlight=torch+nn+moduledict#torch.nn.ModuleDict) - ```python torch.nn.ModuleDict(modules=None) ``` ### [paddle.nn.LayerDict](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/LayerDict_cn.html) - ```python paddle.nn.LayerDict(sublayers=None) ``` @@ -15,7 +12,6 @@ paddle.nn.LayerDict(sublayers=None) 两者功能一致,参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----- | ---------- | ---------------------------------------------------------- | | modules | sublayers | 键值对的可迭代对象,值的类型为 paddle.nn.Layer ,参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ModuleList.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ModuleList.md index 1a047247188..9c95bcbe891 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ModuleList.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ModuleList.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.ModuleList - ### [torch.nn.ModuleList](https://pytorch.org/docs/stable/generated/torch.nn.ModuleList.html?highlight=torch+nn+modulelist#torch.nn.ModuleList) - ```python torch.nn.ModuleList(modules=None) ``` ### [paddle.nn.LayerList](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/LayerList_cn.html) - ```python paddle.nn.LayerList(sublayers=None) ``` @@ -15,7 +12,6 @@ paddle.nn.LayerList(sublayers=None) 两者功能一致,参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----- | ---------- | -------------------------- | | modules | sublayers | 要保存的子层,参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.PairwiseDistance.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.PairwiseDistance.md index 37a341b7d4e..4190b1a38c4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.PairwiseDistance.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.PairwiseDistance.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.PairwiseDistance ### [torch.nn.PairwiseDistance](https://pytorch.org/docs/stable/generated/torch.nn.PairwiseDistance.html?highlight=nn+pairwisedistance#torch.nn.PairwiseDistance) - ```python torch.nn.PairwiseDistance(p=2.0, eps=1e-06, @@ -8,7 +7,6 @@ torch.nn.PairwiseDistance(p=2.0, ``` ### [paddle.nn.PairwiseDistance](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/PairwiseDistance_cn.html#pairwisedistance) - ```python paddle.nn.PairwiseDistance(p=2., epsilon=1e-6, @@ -19,7 +17,6 @@ paddle.nn.PairwiseDistance(p=2., 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | p | p | 指定 p 阶的范数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ParameterDict.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ParameterDict.md index 763624ea887..c1fbe0db88d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ParameterDict.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ParameterDict.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.ParameterDict - ### [torch.nn.ParameterDict](https://pytorch.org/docs/stable/generated/torch.nn.ParameterList.html?highlight=nn+parameterlist#torch.nn.ParameterDict) - ```python torch.nn.ParameterDict(values=None) ``` ### [paddle.nn.ParameterDict](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/ParameterDict_cn.html#parameterdict) - ```python paddle.nn.ParameterDict(parameters=None) ``` @@ -16,7 +13,6 @@ paddle.nn.ParameterDict(parameters=None) ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------- | | values | parameters | 可迭代的 Parameters,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ParameterList.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ParameterList.md index 63696e098cd..5c0e845c0dc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ParameterList.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.ParameterList.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.ParameterList ### [torch.nn.ParameterList](https://pytorch.org/docs/stable/generated/torch.nn.ParameterList.html?highlight=nn+parameterlist#torch.nn.ParameterList) - ```python torch.nn.ParameterList(values=None) ``` ### [paddle.nn.ParameterList](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/ParameterList_cn.html#parameterlist) - ```python paddle.nn.ParameterList(parameters=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Softmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Softmax.md index c2f1e199169..b8cadb14753 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Softmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Softmax.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.Softmax ### [torch.nn.Softmax](https://pytorch.org/docs/stable/generated/torch.nn.Softmax.html?highlight=nn+softmax#torch.nn.Softmax) - ```python torch.nn.Softmax(dim=None) ``` ### [paddle.nn.Softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Softmax_cn.html#softmax) - ```python paddle.nn.Softmax(axis=- 1, name=None) @@ -14,7 +12,6 @@ paddle.nn.Softmax(axis=- 1, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 指定对输入 Tensor 进行运算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Softshrink.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Softshrink.md index 28bf71cd5ee..ba1292259c4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Softshrink.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Softshrink.md @@ -1,12 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.Softshrink ### [torch.nn.Softshrink](https://pytorch.org/docs/stable/generated/torch.nn.Softshrink.html?highlight=nn+softshrink#torch.nn.Softshrink) - ```python torch.nn.Softshrink(lambd=0.5) ``` ### [paddle.nn.Softshrink](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Softshrink_cn.html#softshrink) - ```python paddle.nn.Softshrink(threshold=0.5, name=None) @@ -14,7 +12,6 @@ paddle.nn.Softshrink(threshold=0.5, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | lambd | threshold | Softshrink 激活计算公式中的阈值,必须大于等于零,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Unflatten.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Unflatten.md index 9ae6319af6a..16feab99c6f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Unflatten.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Unflatten.md @@ -1,19 +1,16 @@ ## [ 仅参数名不一致 ]torch.nn.Unflatten ### [torch.nn.Unflatten](https://pytorch.org/docs/stable/generated/torch.nn.Unflatten.html?highlight=torch+nn+unflatten#torch.nn.Unflatten) - ```python torch.nn.Unflatten(dim, unflattened_size) ``` ### [paddle.nn.Unflatten](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Unflatten_cn.html#unflatten) - ```python paddle.nn.Unflatten(axis, shape, name=None) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 指定对输入 Tensor 进行运算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Unfold.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Unfold.md index c23ad69a298..a06842d05d1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Unfold.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.Unfold.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]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, dilation=1, @@ -9,7 +8,6 @@ torch.nn.Unfold(kernel_size, ``` ### [paddle.nn.Unfold](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Unfold_cn.html#unfold) - ```python paddle.nn.Unfold(kernel_sizes=[3, 3], strides=1, @@ -21,19 +19,9 @@ paddle.nn.Unfold(kernel_sizes=[3, 3], 其中功能一致, 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_sizes | 卷积核的尺寸。 | | dilation | dilations | 卷积膨胀。 | | padding | paddings | 每个维度的扩展,仅参数名不一致。 | | stride | strides | 卷积步长,仅参数名不一致。 | - -### 转写示例 -``` python -# PyTorch 写法: -unfold = nn.Unfold(kernel_size=(2, 3)) - -# Paddle 写法 -unfold = nn.Unfold(kernel_sizes=[2, 3]) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool1d.md index 591e548083d..dcd292dbcb1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool1d.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.nn.functional.adaptive_avg_pool1d - ### [torch.nn.functional.adaptive_avg_pool1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_avg_pool1d.html?highlight=adaptive_avg_pool1d#torch.nn.functional.adaptive_avg_pool1d) - ```python torch.nn.functional.adaptive_avg_pool1d(input, output_size) ``` ### [paddle.nn.functional.adaptive_avg_pool1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/adaptive_avg_pool1d_cn.html) - ```python paddle.nn.functional.adaptive_avg_pool1d(x, output_size, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool2d.md index e8061fac2de..4885a1e2d1a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool2d.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.functional.adaptive_avg_pool2d - ### [torch.nn.functional.adaptive_avg_pool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_avg_pool2d.html?highlight=adaptive_avg_pool2d#torch.nn.functional.adaptive_avg_pool2d) - ```python torch.nn.functional.adaptive_avg_pool2d(input, output_size) ``` ### [paddle.nn.functional.adaptive_avg_pool2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/adaptive_avg_pool2d_cn.html) - ```python paddle.nn.functional.adaptive_avg_pool2d(x, output_size, @@ -17,7 +14,6 @@ paddle.nn.functional.adaptive_avg_pool2d(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool3d.md index 16419fd9b23..075b437c0ef 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_avg_pool3d.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.functional.adaptive_avg_pool3d - ### [torch.nn.functional.adaptive_avg_pool3d](https://pytorch.org/docs/stable/generated/torch.ao.nn.quantized.functional.adaptive_avg_pool3d.html?highlight=adaptive_avg_pool3d#torch.ao.nn.quantized.functional.adaptive_avg_pool3d) - ```python torch.nn.functional.adaptive_avg_pool3d(input, output_size) ``` ### [paddle.nn.functional.adaptive_avg_pool3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/adaptive_avg_pool3d_cn.html) - ```python paddle.nn.functional.adaptive_avg_pool3d(x, output_size, @@ -18,7 +15,6 @@ paddle.nn.functional.adaptive_avg_pool3d(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool1d.md index 40cccf68416..d6a74932a66 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool1d.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.functional.adaptive_max_pool1d - ### [torch.nn.functional.adaptive_max_pool1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_max_pool1d.html?highlight=torch+nn+functional+adaptive_max_pool1d#torch.nn.functional.adaptive_max_pool1d) - ```python torch.nn.functional.adaptive_max_pool1d(input, output_size, @@ -9,7 +7,6 @@ torch.nn.functional.adaptive_max_pool1d(input, ``` ### [paddle.nn.functional.adaptive_max_pool1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/adaptive_max_pool1d_cn.html#adaptive-max-pool1d) - ```python paddle.nn.functional.adaptive_max_pool1d(x, output_size, @@ -20,7 +17,6 @@ paddle.nn.functional.adaptive_max_pool1d(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool2d.md index 1171902520a..efffaf55f09 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool2d.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.functional.adaptive_max_pool2d - ### [torch.nn.functional.adaptive_max_pool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_max_pool2d.html?highlight=adaptive_max_pool2d#torch.nn.functional.adaptive_max_pool2d) - ```python torch.nn.functional.adaptive_max_pool2d(input, output_size, @@ -9,7 +7,6 @@ torch.nn.functional.adaptive_max_pool2d(input, ``` ### [paddle.nn.functional.adaptive_max_pool2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/adaptive_max_pool2d_cn.html) - ```python paddle.nn.functional.adaptive_max_pool2d(x, output_size, @@ -19,7 +16,6 @@ paddle.nn.functional.adaptive_max_pool2d(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool3d.md index dbd6a7a690c..349ba68edb9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.adaptive_max_pool3d.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.functional.adaptive_max_pool3d - ### [torch.nn.functional.adaptive_max_pool3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.adaptive_max_pool3d.html?highlight=adaptive_max_pool3d#torch.nn.functional.adaptive_max_pool3d) - ```python torch.nn.functional.adaptive_max_pool3d(input, output_size, @@ -9,7 +7,6 @@ torch.nn.functional.adaptive_max_pool3d(input, ``` ### [paddle.nn.functional.adaptive_max_pool3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/adaptive_max_pool3d_cn.html) - ```python paddle.nn.functional.adaptive_max_pool3d(x, output_size, @@ -19,7 +16,6 @@ paddle.nn.functional.adaptive_max_pool3d(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.affine_grid.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.affine_grid.md index a42b3879704..05a9e302ff9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.affine_grid.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.affine_grid.md @@ -1,7 +1,5 @@ -## [ 仅参数名不一致 ] torch.nn.functional.affine_grid - +## [ 仅参数名不一致 ]torch.nn.functional.affine_grid ### [torch.nn.functional.affine_grid](https://pytorch.org/docs/stable/generated/torch.nn.functional.affine_grid.html?highlight=affine_grid#torch.nn.functional.affine_grid) - ```python torch.nn.functional.affine_grid(theta, size, @@ -9,7 +7,6 @@ torch.nn.functional.affine_grid(theta, ``` ### [paddle.nn.functional.affine_grid](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/affine_grid_cn.html) - ```python paddle.nn.functional.affine_grid(theta, out_shape, @@ -19,7 +16,6 @@ paddle.nn.functional.affine_grid(theta, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | theta | theta | 指定仿射变换矩阵 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.cosine_similarity.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.cosine_similarity.md index ec1010215c3..ffe53207fc5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.cosine_similarity.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.cosine_similarity.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.functional.cosine_similarity - ### [torch.nn.functional.cosine_similarity](https://pytorch.org/docs/stable/generated/torch.nn.functional.cosine_similarity.html?highlight=cosine#torch.nn.functional.cosine_similarity) - ```python torch.nn.functional.cosine_similarity(x1, x2, @@ -12,7 +10,6 @@ torch.nn.functional.cosine_similarity(x1, ``` ### [paddle.nn.functional.cosine_similarity](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/cosine_similarity_cn.html) - ```python paddle.nn.functional.cosine_similarity(x1, x2, @@ -22,7 +19,6 @@ paddle.nn.functional.cosine_similarity(x1, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | x1 | x1 | 表示第一个输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.elu_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.elu_.md index 314c5879b71..245c19ef960 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.elu_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.elu_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.functional.elu_ - ### [torch.nn.functional.elu_](https://www.paddlepaddle.org.cn/documentation/docs/stable/api/paddle/nn/functional/elu__cn.html) - ```python torch.nn.functional.elu_(input, alpha=1.0) ``` ### [paddle.nn.functional.elu_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/relu__cn.html) - ```python paddle.nn.functional.elu_(x, alpha=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.elu_(x, alpha=1.0, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.fold.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.fold.md index 4690903b8fc..f4d15dfd779 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.fold.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.fold.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.functional.fold - ### [torch.nn.functional.fold](https://pytorch.org/docs/stable/generated/torch.nn.functional.fold.html?highlight=functional+fold#torch.nn.functional.fold) - ```python torch.nn.functional.fold(input, output_size, @@ -12,7 +10,6 @@ torch.nn.functional.fold(input, ``` ### [paddle.nn.functional.fold](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/fold_cn.html) - ```python paddle.nn.functional.fold(x, output_sizes, @@ -25,7 +22,6 @@ paddle.nn.functional.fold(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.gaussian_nll_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.gaussian_nll_loss.md index 53c6974fba0..a626f9cb3b9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.gaussian_nll_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.gaussian_nll_loss.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.functional.gaussian_nll_loss - +## [ 仅参数名不一致 ]torch.nn.functional.gaussian_nll_loss ### [torch.nn.functional.gaussian_nll_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.gaussian_nll_loss.html#torch.nn.functional.gaussian_nll_loss) - ```python torch.nn.functional.gaussian_nll_loss(input, target, var, full=False, eps=1e-06, reduction='mean') ``` ### [paddle.nn.functional.gaussian_nll_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/gaussian_nll_loss_cn.html#gaussian-nll-loss) - ```python paddle.nn.functional.gaussian_nll_loss(input, label, variance, full=False, epsilon=1e-6, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.gaussian_nll_loss(input, label, variance, full=False, epsil 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | ----------------------------------------------------------------- | | input | input | 输入 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.glu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.glu.md index 553e65baa75..bdc5e11b0d0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.glu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.glu.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.nn.functional.glu - ### [torch.nn.functional.glu](https://pytorch.org/docs/stable/generated/torch.nn.functional.glu.html?highlight=glu#torch.nn.functional.glu) - ```python torch.nn.functional.glu(input, dim=- 1) ``` ### [paddle.nn.functional.glu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/glu_cn.html) - ```python paddle.nn.functional.glu(x, axis=- 1, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.grid_sample.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.grid_sample.md index 2eab8453def..1a311b27432 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.grid_sample.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.grid_sample.md @@ -1,7 +1,5 @@ -## [ 仅参数名不一致 ] torch.nn.functional.grid_sample - +## [ 仅参数名不一致 ]torch.nn.functional.grid_sample ### [torch.nn.functional.grid_sample](https://pytorch.org/docs/stable/generated/torch.nn.functional.grid_sample.html?highlight=grid_sample#torch.nn.functional.grid_sample) - ```python torch.nn.functional.grid_sample(input, grid, @@ -11,7 +9,6 @@ torch.nn.functional.grid_sample(input, ``` ### [paddle.nn.functional.grid_sample](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/grid_sample_cn.html) - ```python paddle.nn.functional.grid_sample(x, grid, @@ -23,7 +20,6 @@ paddle.nn.functional.grid_sample(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.hardshrink.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.hardshrink.md index 433bbc696ba..8737e578009 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.hardshrink.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.hardshrink.md @@ -1,14 +1,11 @@ ## [ 仅参数名不一致 ]torch.nn.functional.hardshrink - ### [torch.nn.functional.hardshrink](https://pytorch.org/docs/stable/generated/torch.nn.functional.hardshrink.html?highlight=hardshrink#torch.nn.functional.hardshrink) - ```python torch.nn.functional.hardshrink(input, lambd=0.5) ``` ### [paddle.nn.functional.hardshrink](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/hardshrink_cn.html) - ```python paddle.nn.functional.hardshrink(x, threshold=0.5, @@ -17,7 +14,6 @@ paddle.nn.functional.hardshrink(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.hardtanh_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.hardtanh_.md index 60c5afea788..6361bf9968f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.hardtanh_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.hardtanh_.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.functional.hardtanh_ - ### [torch.nn.functional.hardtanh_](https://pytorch.org/docs/stable/jit_builtin_functions.html#supported-tensor-methods) - ```python torch.nn.functional.hardtanh_(input, min_val=-1, max_val=1) ``` ### [paddle.nn.functional.hardtanh_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/hardtanh_cn.html) - ```python paddle.nn.functional.hardtanh_(x, min=-1.0, max=1.0) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.hardtanh_(x, min=-1.0, max=1.0) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.huber_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.huber_loss.md index d44889a10be..3b3c869a45b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.huber_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.huber_loss.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.functional.huber_loss - +## [ 仅参数名不一致 ]torch.nn.functional.huber_loss ### [torch.nn.functional.huber_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.huber_loss.html#torch.nn.functional.huber_loss) - ```python torch.nn.functional.huber_loss(input, target, reduction='mean', delta=1.0) ``` ### [paddle.nn.functional.smooth_l1_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/smooth_l1_loss_cn.html) - ```python paddle.nn.functional.smooth_l1_loss(input, label, reduction='mean', delta=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.smooth_l1_loss(input, label, reduction='mean', delta=1.0, n 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | ----------------------------------------- | | input | input | 输入 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.leaky_relu_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.leaky_relu_.md index 9bccbe95da2..b239a27bbaf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.leaky_relu_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.leaky_relu_.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.functional.leaky_relu_ - +## [ 仅参数名不一致 ]torch.nn.functional.leaky_relu_ ### [torch.nn.functional.leaky_relu_](https://pytorch.org/docs/stable/jit_builtin_functions.html#supported-tensor-methods) - ```python torch.nn.functional.leaky_relu_(input, negative_slope=0.01) ``` ### [paddle.nn.functional.leaky_relu_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/leaky_relu_cn.html) - ```python paddle.nn.functional.leaky_relu_(x, negative_slope=0.01) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.leaky_relu_(x, negative_slope=0.01) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | -------------- | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.local_response_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.local_response_norm.md index d85cb1034da..439b6c08e60 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.local_response_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.local_response_norm.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.functional.local_response_norm - ### [torch.nn.functional.local_response_norm](https://pytorch.org/docs/stable/generated/torch.nn.functional.local_response_norm.html?highlight=local_response_norm#torch.nn.functional.local_response_norm) - ```python torch.nn.functional.local_response_norm(input, size, @@ -11,7 +9,6 @@ torch.nn.functional.local_response_norm(input, ``` ### [paddle.nn.functional.local_response_norm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/local_response_norm_cn.html) - ```python paddle.nn.functional.local_response_norm(x, size, @@ -24,7 +21,6 @@ paddle.nn.functional.local_response_norm(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.log_sigmoid.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.log_sigmoid.md index 2e54f69452b..703502b0a43 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.log_sigmoid.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.log_sigmoid.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.nn.functional.logsigmoid - ### [torch.nn.functional.logsigmoid](https://pytorch.org/docs/stable/generated/torch.nn.functional.logsigmoid.html?highlight=logsigmoid#torch.nn.functional.logsigmoid) - ```python torch.nn.functional.logsigmoid(input) ``` ### [paddle.nn.functional.log_sigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/log_sigmoid_cn.html) - ```python paddle.nn.functional.log_sigmoid(x, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.pairwise_distance.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.pairwise_distance.md index 22fe3877572..b3d48d0ab3a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.pairwise_distance.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.pairwise_distance.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.functional.pairwise_distance - ### [torch.nn.functional.pairwise\_distance](https://pytorch.org/docs/stable/generated/torch.nn.functional.pairwise_distance.html) - ```python torch.nn.functional.pairwise_distance(x1, x2, p=2.0, eps=1e-6, keepdim=False) ``` ### [paddle.nn.functional.pairwise\_distance](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/pairwise_distance_cn.html#pairwise-distance) - ```python paddle.nn.functional.pairwise_distance(x, y, p=2., epsilon=1e-6, keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.pairwise_distance(x, y, p=2., epsilon=1e-6, keepdim=False, 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | x1 | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.pdist.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.pdist.md index 2cb27148786..502c68aea02 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.pdist.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.pdist.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.functional.pdist - +## [ 仅参数名不一致 ]torch.nn.functional.pdist ### [torch.nn.functional.pdist](https://pytorch.org/docs/stable/generated/torch.nn.functional.pdist.html#torch.nn.functional.pdist) - ```python torch.nn.functional.pdist(input, p=2) ``` ### [paddle.pdist](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/pdist_cn.html) - ```python paddle.pdist(x, p=2.0) ``` @@ -15,7 +12,6 @@ paddle.pdist(x, p=2.0) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.relu6.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.relu6.md index 3185eaef88e..8fa301f78d1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.relu6.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.relu6.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.nn.functional.relu6 - ### [torch.nn.functional.relu6](https://pytorch.org/docs/stable/generated/torch.nn.functional.relu6.html?highlight=relu6#torch.nn.functional.relu6) - ```python torch.nn.functional.relu6(input, inplace=False) ``` ### [paddle.nn.functional.relu6](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/relu6_cn.html) - ```python paddle.nn.functional.relu6(x, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.relu_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.relu_.md index 153f1b9eea4..a2d5e65b5b4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.relu_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.relu_.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.nn.functional.relu_ - ### [torch.nn.functional.relu_](https://pytorch.org/docs/stable/generated/torch.nn.functional.relu_.html?highlight=relu_#torch.nn.functional.relu_) - ```python torch.nn.functional.relu_(input) ``` ### [paddle.nn.functional.relu_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/relu__cn.html) - ```python paddle.nn.functional.relu_(x, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softplus.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softplus.md index 784e9453eca..67e59c51344 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softplus.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softplus.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.functional.softplus - ### [torch.nn.functional.softplus](https://pytorch.org/docs/stable/generated/torch.nn.functional.softplus.html?highlight=softplus#torch.nn.functional.softplus) - ```python torch.nn.functional.softplus(input, beta=1, @@ -9,7 +7,6 @@ torch.nn.functional.softplus(input, ``` ### [paddle.nn.functional.softplus](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softplus_cn.html) - ```python paddle.nn.functional.softplus(x, beta=1, @@ -19,7 +16,6 @@ paddle.nn.functional.softplus(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示 Softplus 激活计算公式中的 beta 值 ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softshrink.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softshrink.md index 583beb56e99..e7fd3a507fe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softshrink.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softshrink.md @@ -1,14 +1,11 @@ ## [ 仅参数名不一致 ]torch.nn.functional.softshrink - ### [torch.nn.functional.softshrink](https://pytorch.org/docs/stable/generated/torch.nn.functional.softshrink.html?highlight=softshrink#torch.nn.functional.softshrink) - ```python torch.nn.functional.softshrink(input, lambd=0.5) ``` ### [paddle.nn.functional.softshrink](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softshrink_cn.html) - ```python paddle.nn.functional.softshrink(x, threshold=0.5, @@ -17,7 +14,6 @@ paddle.nn.functional.softshrink(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softsign.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softsign.md index 26e3052ad69..27593d9b20d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softsign.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.softsign.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.functional.softsign - ### [torch.nn.functional.softsign](https://pytorch.org/docs/stable/generated/torch.nn.functional.softsign.html?highlight=softsign#torch.nn.functional.softsign) - ```python torch.nn.functional.softsign(input) ``` ### [paddle.nn.functional.softsign](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softsign_cn.html) - ```python paddle.nn.functional.softsign(x, name=None) @@ -15,7 +12,6 @@ paddle.nn.functional.softsign(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.tanh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.tanh.md index ddb30ea1cca..9727149fa52 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.tanh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.tanh.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.functional.tanh - ### [torch.nn.functional.tanh](https://pytorch.org/docs/stable/generated/torch.nn.functional.tanh.html) - ```python torch.nn.functional.tanh(input) ``` ### [paddle.nn.functional.tanh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/tanh_cn.html#tanh) - ```python paddle.nn.functional.tanh(x) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.tanh(x) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.tanhshrink.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.tanhshrink.md index 27b54b0c2a7..244812c3177 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.tanhshrink.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.tanhshrink.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.functional.tanhshrink - ### [torch.nn.functional.tanhshrink](https://pytorch.org/docs/stable/generated/torch.nn.functional.tanhshrink.html?highlight=tanhshri#torch.nn.functional.tanhshrink) - ```python torch.nn.functional.tanhshrink(input) ``` ### [paddle.nn.functional.tanhshrink](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/tanhshrink_cn.html) - ```python paddle.nn.functional.tanhshrink(x, name=None) @@ -15,7 +12,6 @@ paddle.nn.functional.tanhshrink(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.triplet_margin_with_distance_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.triplet_margin_with_distance_loss.md index c5ef362acd3..aa6bd0f81cd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.triplet_margin_with_distance_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.triplet_margin_with_distance_loss.md @@ -1,7 +1,5 @@ -## [ 仅参数名不一致 ] torch.nn.functional.triplet_margin_with_distance_loss - +## [ 仅参数名不一致 ]torch.nn.functional.triplet_margin_with_distance_loss ### [torch.nn.functional.triplet_margin_with_distance_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.triplet_margin_with_distance_loss.html?highlight=triplet_margin_with_distance_loss#torch.nn.functional.triplet_margin_with_distance_loss) - ```python torch.nn.functional.triplet_margin_with_distance_loss(anchor, positive, @@ -13,7 +11,6 @@ torch.nn.functional.triplet_margin_with_distance_loss(anchor, ``` ### [paddle.nn.functional.triplet_margin_with_distance_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/triplet_margin_with_distance_loss_cn.html) - ```python paddle.nn.functional.triplet_margin_with_distance_loss(input, positive, @@ -27,7 +24,6 @@ paddle.nn.functional.triplet_margin_with_distance_loss(input, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | anchor | input | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.unfold.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.unfold.md index 7f28e37f1a7..76f0aef6a3d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.unfold.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.functional.unfold.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.nn.functional.unfold - +## [ 仅参数名不一致 ]torch.nn.functional.unfold ### [torch.nn.functional.unfold](https://pytorch.org/docs/stable/generated/torch.nn.functional.unfold.html#torch.nn.functional.unfold) - ```python torch.nn.functional.unfold(input, kernel_size, dilation=1, padding=0, stride=1) ``` ### [paddle.nn.functional.unfold](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/unfold_cn.html) - ```python paddle.nn.functional.unfold(x, kernel_sizes, strides=1, paddings=0, dilations=1, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.unfold(x, kernel_sizes, strides=1, paddings=0, dilations=1, 其中功能一致, 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | --------------------------------- | | input | x | 输入 4-D Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.parametrizations.weight_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.parametrizations.weight_norm.md index d48bd2bf5a7..fdf813eaf55 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.parametrizations.weight_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.parametrizations.weight_norm.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.nn.utils.parametrizations.weight_norm - ### [torch.nn.utils.parametrizations.weight_norm](https://pytorch.org/docs/stable/generated/torch.nn.utils.parametrizations.weight_norm.html) - ```python torch.nn.utils.parametrizations.weight_norm(module, name='weight', dim=0) ``` ### [paddle.nn.utils.weight_norm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/utils/weight_norm_cn.html#weight-norm) - ```python paddle.nn.utils.weight_norm(layer, name='weight', dim=0) ``` @@ -15,7 +12,6 @@ paddle.nn.utils.weight_norm(layer, name='weight', dim=0) 其中,PyTorch 和 Paddle 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | module | layer | 要添加权重归一化的层,仅参数名不一致。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.remove_weight_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.remove_weight_norm.md index f072155dfce..0614e702ca3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.remove_weight_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.remove_weight_norm.md @@ -1,20 +1,17 @@ ## [ 仅参数名不一致 ]torch.nn.utils.remove_weight_norm ### [torch.nn.utils.remove_weight_norm](https://pytorch.org/docs/stable/generated/torch.nn.utils.remove_weight_norm.html?highlight=nn+utils+remove_weight_norm#torch.nn.utils.remove_weight_norm) - ```python torch.nn.utils.remove_weight_norm(module, name='weight') ``` ### [paddle.nn.utils.remove_weight_norm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/utils/remove_weight_norm_cn.html#remove-weight-norm) - ```python paddle.nn.utils.remove_weight_norm(layer, name='weight') ``` 两者功能一致,参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | module | layer | 要添加权重归一化的层,参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.spectral_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.spectral_norm.md index 8fe5d7bc42a..eedcdcfd25d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.spectral_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.spectral_norm.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.utils.spectral_norm ### [torch.nn.utils.spectral_norm](https://pytorch.org/docs/stable/generated/torch.nn.utils.spectral_norm.html?highlight=nn+utils+spectral_norm#torch.nn.utils.spectral_norm) - ```python torch.nn.utils.spectral_norm(module, name='weight', @@ -10,7 +9,6 @@ torch.nn.utils.spectral_norm(module, ``` ### [paddle.nn.utils.spectral_norm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/utils/spectral_norm_cn.html#spectral-norm) - ```python paddle.nn.utils.spectral_norm(layer, name='weight', @@ -20,7 +18,6 @@ paddle.nn.utils.spectral_norm(layer, ``` 两者功能一致,参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | module | layer | 要添加权重谱归一化的层,参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.weight_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.weight_norm.md index 16bf324a62c..a2b39c9e217 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.weight_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.nn.utils.weight_norm.md @@ -1,6 +1,5 @@ ## [ 仅参数名不一致 ]torch.nn.utils.weight_norm ### [torch.nn.utils.weight_norm](https://pytorch.org/docs/stable/generated/torch.nn.utils.weight_norm.html?highlight=nn+utils+weight_norm#torch.nn.utils.weight_norm) - ```python torch.nn.utils.weight_norm(module, name='weight', @@ -8,7 +7,6 @@ torch.nn.utils.weight_norm(module, ``` ### [paddle.nn.utils.weight_norm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/utils/weight_norm_cn.html#weight-norm) - ```python paddle.nn.utils.weight_norm(layer, name='weight', @@ -16,7 +14,6 @@ paddle.nn.utils.weight_norm(layer, ``` 两者功能一致,参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | module | layer | 要添加权重归一化的层,参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.pca_lowrank.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.pca_lowrank.md index fcc81b4c7ec..fa8c94b0625 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.pca_lowrank.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.pca_lowrank.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.pca_lowrank - +## [ 仅参数名不一致 ]torch.pca_lowrank ### [torch.pca_lowrank](https://pytorch.org/docs/stable/generated/torch.pca_lowrank.html#torch.pca_lowrank) - ```python torch.pca_lowrank(A, q=None, center=True, niter=2) ``` ### [paddle.linalg.pca_lowrank](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/pca_lowrank_cn.html) - ```python paddle.linalg.pca_lowrank(x, q=None, center=True, niter=2, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.pca_lowrank(x, q=None, center=True, niter=2, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------------------------- | | A | x | 输入的需要进行线性主成分分析的一个或一批方阵,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.pinverse.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.pinverse.md index 473b63e3c44..9d36a72cd63 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.pinverse.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.pinverse.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.pinverse ### [torch.pinverse](https://pytorch.org/docs/stable/generated/torch.pinverse.html?highlight=pinverse#torch.pinverse) - ```python torch.pinverse(input, rcond=1e-15) ``` ### [paddle.linalg.pinv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/pinv_cn.html#pinv) - ```python paddle.linalg.pinv(x, rcond=1e-15, @@ -17,7 +15,6 @@ paddle.linalg.pinv(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.positive.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.positive.md index ff75e715fe3..b10814f0d87 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.positive.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.positive.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.positive - ### [torch.positive](https://pytorch.org/docs/stable/generated/torch.positive.html#torch-positive) - ```python torch.positive(input) ``` ### [paddle.positive](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/positive_cn.html#positive) - ```python paddle.positive(x) ``` @@ -15,7 +12,6 @@ paddle.positive(x) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.profiler.schedule.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.profiler.schedule.md index a93d15c8dd3..7e153d3e7a0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.profiler.schedule.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.profiler.schedule.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.profiler.schedule - +## [ 仅参数名不一致 ]torch.profiler.schedule ### [torch.profiler.schedule](https://pytorch.org/docs/stable/profiler.html#torch.profiler.schedule) - ```python torch.profiler.schedule(*, wait, warmup, active, repeat=0, skip_first=0) ``` ### [paddle.profiler.make_scheduler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/profiler/make_scheduler_cn.html) - ```python paddle.profiler.make_scheduler(*, closed, ready, record, repeat=0, skip_first=0) ``` @@ -15,7 +12,6 @@ paddle.profiler.make_scheduler(*, closed, ready, record, repeat=0, skip_first=0) 两者功能一致,参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | ------------------------------------------------------------------- | | wait | closed | 处于 wait/ProfilerState.CLOSED 状态的 step 数量,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.real.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.real.md index 5389f88543f..b237c561d2e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.real.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.real.md @@ -1,19 +1,16 @@ ## [ 仅参数名不一致 ]torch.real ### [torch.real](https://pytorch.org/docs/stable/generated/torch.real.html?highlight=real#torch.real) - ```python torch.real(input) ``` ### [paddle.real](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/real_cn.html#real) - ```python paddle.real(x) ``` 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor , 仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.relu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.relu.md index 82cbd174c86..c659a53d6dd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.relu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.relu.md @@ -1,20 +1,16 @@ ## [ 仅参数名不一致 ]torch.relu - ### [torch.relu]() - ```python torch.relu(input) ``` ### [paddle.nn.functional.relu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/relu_cn.html#relu) - ```python paddle.nn.functional.relu(x, name=None) ``` 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.rot90.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.rot90.md index f146c1a2c56..dfa345c4218 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.rot90.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.rot90.md @@ -1,5 +1,4 @@ -## [仅参数名不一致]torch.rot90 - +## [ 仅参数名不一致 ]torch.rot90 ### [torch.rot90](https://pytorch.org/docs/stable/generated/torch.rot90.html?highlight=torch+rot90#torch.rot90) ```python torch.rot90(input, @@ -8,7 +7,6 @@ torch.rot90(input, ``` ### [paddle.rot90](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/rot90_cn.html#rot90) - ```python paddle.rot90(x, k=1, @@ -18,7 +16,6 @@ paddle.rot90(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.row_stack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.row_stack.md index dc9497a88fc..adbebf0ab8a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.row_stack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.row_stack.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.row_stack - ### [torch.row_stack](https://pytorch.org/docs/stable/generated/torch.row_stack.html#torch.row_stack) - ```python torch.row_stack(tensors, *, out=None) ``` ### [paddle.row_stack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/row_stack_cn.html) - ```python paddle.row_stack(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.row_stack(x, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.select_scatter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.select_scatter.md index 949b48ce947..a3f16645fab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.select_scatter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.select_scatter.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.select_scatter - +## [ 仅参数名不一致 ]torch.select_scatter ### [torch.select_scatter](https://pytorch.org/docs/stable/generated/torch.select_scatter.html#torch-select-scatter) - ```python torch.select_scatter(input, src, dim, index) ``` ### [paddle.select_scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/select_scatter_cn.html) - ```python paddle.select_scatter(x, values, axis, index, name=None) ``` @@ -15,7 +12,6 @@ paddle.select_scatter(x, values, axis, index, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------- | | input | x | 输入张量,被嵌入的张量,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.sparse.addmm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.sparse.addmm.md index c941c08896b..0aff1c1690e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.sparse.addmm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.sparse.addmm.md @@ -1,14 +1,11 @@ -## [ 仅参数名不一致 ] torch.sparse.addmm - +## [ 仅参数名不一致 ]torch.sparse.addmm ### [torch.sparse.addmm](https://pytorch.org/docs/stable/generated/torch.sparse.addmm.html?highlight=addmm#torch.sparse.addmm) - ```python # PyTorch 文档有误,测试 PyTorch 第一个参数名为 input torch.sparse.addmm(input, mat1, mat2, beta=1.0, alpha=1.0) ``` ### [paddle.sparse.addmm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sparse/addmm_cn.html) - ```python paddle.sparse.addmm(input, x, y, beta=1.0, alpha=1.0, name=None) ``` @@ -16,7 +13,6 @@ paddle.sparse.addmm(input, x, y, beta=1.0, alpha=1.0, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - |PyTorch | PaddlePaddle | 备注 | |--------| ------------- | --------------------------------------------------------------------------------------| |input | input| 输入 Tensor。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.sparse.mm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.sparse.mm.md index ce485c9a6b8..31aca02042c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.sparse.mm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.sparse.mm.md @@ -1,14 +1,11 @@ -## [ 仅参数名不一致 ] torch.sparse.mm - +## [ 仅参数名不一致 ]torch.sparse.mm ### [torch.sparse.mm](https://pytorch.org/docs/stable/generated/torch.sparse.mm.html?highlight=torch+sparse+mm#torch.sparse.mm) - ```python # PyTorch 文档有误,测试 PyTorch 参数名为 sparse, dense torch.sparse.mm(sparse, dense) ``` ### [paddle.sparse.matmul](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sparse/matmul_cn.html) - ```python paddle.sparse.matmul(x, y, name=None) ``` @@ -16,7 +13,6 @@ paddle.sparse.matmul(x, y, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------ | | sparse | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.special.log_softmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.special.log_softmax.md index e85a5136d17..ee7ad1d97b2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.special.log_softmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.special.log_softmax.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.special.log_softmax - +## [ 仅参数名不一致 ]torch.special.log_softmax ### [torch.special.log_softmax](https://pytorch.org/docs/stable/special.html#torch.special.log_softmax) - ```python torch.special.log_softmax(input, dim, *, dtype=None) ``` ### [paddle.nn.functional.log_softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/log_softmax_cn.html) - ```python paddle.nn.functional.log_softmax(x, axis=- 1, dtype=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.log_softmax(x, axis=- 1, dtype=None, name=None) 其中功能一致, 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.squeeze.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.squeeze.md index 136d10b5ec8..f9ef2f0a472 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.squeeze.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.squeeze.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.squeeze ### [torch.squeeze](https://pytorch.org/docs/stable/generated/torch.squeeze.html?highlight=squeeze#torch.squeeze) - ```python torch.squeeze(input, dim=None) ``` ### [paddle.squeeze](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/squeeze_cn.html#squeeze) - ```python paddle.squeeze(x, axis=None, @@ -16,7 +14,6 @@ paddle.squeeze(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.svd_lowrank.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.svd_lowrank.md index 8835cda7b3b..edd4bd36973 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.svd_lowrank.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.svd_lowrank.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.svd_lowrank - +## [ 仅参数名不一致 ]torch.svd_lowrank ### [torch.svd_lowrank](https://pytorch.org/docs/stable/generated/torch.svd_lowrank.html?highlight=torch+svd_lowrank#torch.svd_lowrank) - ```python torch.svd_lowrank(A, q=6, niter=2, M=None) ``` ### [paddle.linalg.svd_lowrank](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/svd_lowrank_cn.html) - ```python paddle.linalg.svd_lowrank(x, q=None, niter=2, M=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.svd_lowrank(x, q=None, niter=2, M=None, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | A | x | 表示输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.take.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.take.md index 6f46e216fa2..a86e339598b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.take.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.take.md @@ -1,19 +1,16 @@ ## [ 仅参数名不一致 ]torch.take ### [torch.take](https://pytorch.org/docs/stable/generated/torch.take.html?highlight=torch+take#torch.take) - ```python torch.take(input, index) ``` ### [paddle.take](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/take_cn.html#take) - ```python paddle.take(x, index, mode='raise', name=None) ``` 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.tan.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.tan.md index 4f6c08615bd..a6adfebe4e8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.tan.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.tan.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.tan - ### [torch.tan](https://pytorch.org/docs/stable/generated/torch.tan.html) - ```python torch.tan(input, *, out=None) ``` ### [paddle.tan](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/tan_cn.html#tan) - ```python paddle.tan(x, name=None) ``` @@ -15,20 +12,7 @@ paddle.tan(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | input | x | 输入 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor ,Paddle 无此参数,需要转写。 | - -### 转写示例 - -#### out - -```python -# PyTorch -torch.tan(x, out=y) - -# Paddle -paddle.assign(paddle.tan(x), y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.tile.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.tile.md index 371c27ba0ae..4c72670e62a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.tile.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.tile.md @@ -1,13 +1,11 @@ ## [ 仅参数名不一致 ]torch.tile ### [torch.tile](https://pytorch.org/docs/stable/generated/torch.tile.html?highlight=tile#torch.tile) - ```python torch.tile(input, dims) ``` ### [paddle.tile](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/tile_cn.html#tile) - ```python paddle.tile(x, repeat_times, @@ -16,7 +14,6 @@ paddle.tile(x, 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.trace.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.trace.md index 62bdd95b779..cd03d3db9ea 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.trace.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.trace.md @@ -1,11 +1,9 @@ ## [ 仅参数名不一致 ]torch.trace ### [torch.trace](https://pytorch.org/docs/stable/generated/torch.trace.html?highlight=trace#torch.trace) - ```python torch.trace(input) ``` ### [paddle.trace](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/trace_cn.html) - ```python paddle.trace(x, offset=0, @@ -16,7 +14,6 @@ paddle.trace(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.trapezoid.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.trapezoid.md index 3fdcded1ae0..0f00beb2592 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.trapezoid.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.trapezoid.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torch.trapezoid - +## [ 仅参数名不一致 ]torch.trapezoid ### [torch.trapezoid](https://pytorch.org/docs/stable/generated/torch.trapezoid.html#torch.trapezoid) - ```python torch.trapezoid(y, x=None, *, dx=None, dim=- 1) ``` ### [paddle.trapezoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/trapezoid_cn.html#trapezoid) - ```python paddle.trapezoid(y, x=None, dx=None, axis=- 1, name=None) ``` @@ -15,7 +12,6 @@ paddle.trapezoid(y, x=None, dx=None, axis=- 1, name=None) 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------- | | y | y | 输入多维 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.unflatten.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.unflatten.md index 21a3885c255..5bed30c8b7d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.unflatten.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.unflatten.md @@ -1,13 +1,10 @@ -## [ 仅参数名不一致 ] torch.unflatten - +## [ 仅参数名不一致 ]torch.unflatten ### [torch.unflatten](https://pytorch.org/docs/stable/generated/torch.unflatten.html#torch.unflatten) - ```python torch.unflatten(input, dim, sizes) ``` ### [paddle.unflatten](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/unflatten_cn.html#unflatten) - ```python paddle.unflatten(x, axis, shape, name=None) ``` @@ -15,7 +12,6 @@ paddle.unflatten(x, axis, shape, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.utils.dlpack.from_dlpack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.utils.dlpack.from_dlpack.md index 6058d9b2dd8..13f0b159ad4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.utils.dlpack.from_dlpack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.utils.dlpack.from_dlpack.md @@ -1,19 +1,16 @@ ## [ 仅参数名不一致 ]torch.utils.dlpack.from_dlpack ### [torch.utils.dlpack.from_dlpack](https://pytorch.org/docs/stable/dlpack.html?highlight=torch+utils+dlpack+from_dlpack#torch.utils.dlpack.from_dlpack) - ```python torch.utils.dlpack.from_dlpack(ext_tensor) ``` ### [paddle.utils.dlpack.from_dlpack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/utils/dlpack/from_dlpack_cn.html) - ```python paddle.utils.dlpack.from_dlpack(dlpack) ``` 两者功能一致,参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | ext_tensor | dlpack | DLPack,即带有 dltensor 的 PyCapsule 对象,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.utils.dlpack.to_dlpack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.utils.dlpack.to_dlpack.md index 70798832ea5..97a07d6f0a4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.utils.dlpack.to_dlpack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.utils.dlpack.to_dlpack.md @@ -1,19 +1,16 @@ ## [ 仅参数名不一致 ]torch.utils.dlpack.to_dlpack ### [torch.utils.dlpack.to_dlpack](https://pytorch.org/docs/stable/dlpack.html?highlight=torch+utils+dlpack+to_dlpack#torch.utils.dlpack.to_dlpack) - ```python torch.utils.dlpack.to_dlpack(tensor) ``` ### [paddle.utils.dlpack.to_dlpack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/utils/dlpack/to_dlpack_cn.html) - ```python paddle.utils.dlpack.to_dlpack(x) ``` 两者功能一致,参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensor | x | Paddle Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vander.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vander.md index e4cef2ccad3..08b608dedf2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vander.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vander.md @@ -1,7 +1,5 @@ ## [ 仅参数名不一致 ]torch.vander - ### [torch.vander](https://pytorch.org/docs/stable/generated/torch.vander.html?highlight=vander#torch.vander) - ```python torch.vander(x, N, @@ -9,7 +7,6 @@ torch.vander(x, ``` ### [paddle.vander](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vander_cn.html#vander) - ```python paddle.vander(x, n, @@ -19,7 +16,6 @@ paddle.vander(x, 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | x | x | 表示输入的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vsplit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vsplit.md index 9ab05a0454c..ad07c24fba0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vsplit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vsplit.md @@ -2,6 +2,7 @@ api 存在重载情况,分别如下: ------------------------------------------------------------------------------------------------- + ### [torch.vsplit](https://pytorch.org/docs/stable/generated/torch.vsplit.html#torch.vsplit) ```python @@ -10,7 +11,6 @@ torch.vsplit(input, ``` ### [paddle.vsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vsplit_cn.html) - ```python paddle.vsplit(x, num_or_indices, @@ -20,7 +20,6 @@ paddle.vsplit(x, 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入多维 Tensor ,仅参数名不一致。 | @@ -29,14 +28,12 @@ paddle.vsplit(x, ------------------------------------------------------------------------------------------------- ### [torch.vsplit](https://pytorch.org/docs/stable/generated/torch.vsplit.html#torch.vsplit) - ```python torch.vsplit(input, indices) ``` ### [paddle.vsplit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vsplit_cn.html) - ```python paddle.vsplit(x, num_or_indices, @@ -46,7 +43,6 @@ paddle.vsplit(x, 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入多维 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vstack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vstack.md index c16c4582ed0..61f1543274d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vstack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.vstack.md @@ -1,13 +1,10 @@ ## [ 仅参数名不一致 ]torch.vstack - ### [torch.vstack](https://pytorch.org/docs/stable/generated/torch.vstack.html#torch.vstack) - ```python torch.vstack(tensors, *, out=None) ``` ### [paddle.vstack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vstack_cn.html) - ```python paddle.vstack(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.vstack(x, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torchvision.io.read_file.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torchvision.io.read_file.md index 82300c641c7..cd1ef8da06d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torchvision.io.read_file.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torchvision.io.read_file.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]torchvision.io.read_file - +## [ 仅参数名不一致 ]torchvision.io.read_file ### [torchvision.io.read_file](https://pytorch.org/vision/main/generated/torchvision.io.read_file.html) - ```python torchvision.io.read_file(path) ``` ### [paddle.vision.ops.read_file](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/ops/read_file_cn.html#cn-api-paddle-vision-ops-read-file) - ```python paddle.vision.ops.read_file(filename, name=None) ``` @@ -15,7 +12,6 @@ paddle.vision.ops.read_file(filename, name=None) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------ | -------------------- | ---------------------------------------------------------- | | path | filename | 文件路径,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.StoppingCriteriaList.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.StoppingCriteriaList.md index 10f3656df3a..a817b554308 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.StoppingCriteriaList.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.StoppingCriteriaList.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]transformers.StoppingCriteriaList - +## [ 仅参数名不一致 ]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) ``` ### [paddlenlp.generation.StoppingCriteriaList](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/generation/stopping_criteria.py#L72) - ```python paddlenlp.generation.StoppingCriteriaList(input_ids: paddle.Tensor, scores: paddle.Tensor, **kwargs) ``` @@ -15,7 +12,6 @@ paddlenlp.generation.StoppingCriteriaList(input_ids: paddle.Tensor, scores: padd 两者功能一致,仅参数名不一致,具体如下: ### 参数映射 - | transformers | PaddlePaddle | 备注 | | ----------------- | ----------------- | --------------------------------------- | | input_ids | input_ids | 输入(tokens) 的 id 组成的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.generation.LogitsProcessor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.generation.LogitsProcessor.md index 82210d4d3f9..ba072e3179b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.generation.LogitsProcessor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/transformers.generation.LogitsProcessor.md @@ -1,13 +1,10 @@ -## [仅参数名不一致]transformers.generation.LogitsProcessor - +## [ 仅参数名不一致 ]transformers.generation.LogitsProcessor ### [transformers.generation.LogitsProcessor](https://hf-mirror.com/docs/transformers/v4.42.0/en/internal/generation_utils#logitsprocessor) - ```python transformers.generation.LogitsProcessor(input_ids: torch.LongTensor, scores: torch.FloatTensor) ``` ### [paddlenlp.generation.LogitsProcessor](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/generation/logits_process.py#L26) - ```python paddlenlp.generation.LogitsProcessor(input_ids: paddle.Tensor, scores: paddle.Tensor) ``` @@ -15,7 +12,6 @@ paddlenlp.generation.LogitsProcessor(input_ids: paddle.Tensor, scores: paddle.Te 两者功能一致但参数名不一致,部分参数名不同,具体如 ### 参数映射 - | transformers | PaddlePaddle | 备注 | | ----------------- | ----------------- | --------------------------------------- | | input_ids | input_ids | 输入(tokens) 的 id 组成的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/fairscale.nn.model_parallel.initialize.initialize_model_parallel.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/fairscale.nn.model_parallel.initialize.initialize_model_parallel.md index 26d5a111f53..c2866ce429d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/fairscale.nn.model_parallel.initialize.initialize_model_parallel.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/fairscale.nn.model_parallel.initialize.initialize_model_parallel.md @@ -1,7 +1,5 @@ -## [组合替代实现]fairscale.nn.model_parallel.initialize.initialize_model_parallel - +## [ 组合替代实现 ]fairscale.nn.model_parallel.initialize.initialize_model_parallel ### [fairscale.nn.model_parallel.initialize.initialize_model_parallel](https://github.com/facebookresearch/fairscale/blob/164cc0f3170b4a3951dd84dda29c3e1504ac4d6e/fairscale/nn/model_parallel/initialize.py#L41) - ```python fairscale.nn.model_parallel.initialize.initialize_model_parallel() ``` @@ -9,7 +7,6 @@ fairscale.nn.model_parallel.initialize.initialize_model_parallel() 对模型并行设置进行初始化; Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # Pytorch 写法 fairscale.nn.model_parallel.initialize.initialize_model_parallel(model_parallel_size_=model_parallel_size_,pipeline_length=pipeline_length) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/fairscale.nn.model_parallel.initialize.model_parallel_is_initialized.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/fairscale.nn.model_parallel.initialize.model_parallel_is_initialized.md index cdb8b3fca81..67672540776 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/fairscale.nn.model_parallel.initialize.model_parallel_is_initialized.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/fairscale.nn.model_parallel.initialize.model_parallel_is_initialized.md @@ -1,7 +1,5 @@ -## [组合替代实现]fairscale.nn.model_parallel.initialize.model_parallel_is_initialized - +## [ 组合替代实现 ]fairscale.nn.model_parallel.initialize.model_parallel_is_initialized ### [fairscale.nn.model_parallel.initialize.model_parallel_is_initialized](https://github.com/facebookresearch/fairscale/blob/164cc0f3170b4a3951dd84dda29c3e1504ac4d6e/fairscale/nn/model_parallel/initialize.py#L119) - ```python fairscale.nn.model_parallel.initialize.model_parallel_is_initialized() ``` @@ -9,7 +7,6 @@ fairscale.nn.model_parallel.initialize.model_parallel_is_initialized() 返回模型并行初始化设置是否完成; Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # Pytorch 写法 fairscale.nn.model_parallel.initialize.model_parallel_is_initialized() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/flash_attn.layers.rotary.apply_rotary_emb_func.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/flash_attn.layers.rotary.apply_rotary_emb_func.md index 6f24c24b0d4..45a50022e6a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/flash_attn.layers.rotary.apply_rotary_emb_func.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/flash_attn.layers.rotary.apply_rotary_emb_func.md @@ -1,7 +1,5 @@ -## [组合替代实现] flash_attn.layers.rotary.apply_rotary_emb_func - +## [ 组合替代实现 ]flash_attn.layers.rotary.apply_rotary_emb_func ### [flash_attn.layers.rotary.apply_rotary_emb_func](https://github.com/Dao-AILab/flash-attention/blob/c4b9015d74bd9f638c6fd574482accf4bbbd4197/flash_attn/layers/rotary.py#L128) - ```python flash_attn.layers.rotary.apply_rotary_emb_func(x, cos, sin, interleaved=False, inplace=False, seqlen_offsets: Union[int, torch.Tensor] = 0, cu_seqlens: Optional[torch.Tensor] = None, max_seqlen: Optional[int] = None) ``` @@ -9,7 +7,6 @@ flash_attn.layers.rotary.apply_rotary_emb_func(x, cos, sin, interleaved=False, i Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # Pytorch 写法 res = flash_attn.layers.rotary.apply_rotary_emb_fun(x, cos, sin) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/os.environ.get.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/os.environ.get.md index f23d34725f2..1bac3d4012e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/os.environ.get.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/os.environ.get.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]os.environ.get - ### [os.environ.get](https://docs.python.org/zh-cn/3/library/os.html#os.environ) - ```python os.environ.get(key, value) ``` @@ -9,7 +7,6 @@ os.environ.get(key, value) Paddle 无此 API,需要组合实现。该 API 一般情况下与 Paddle 无关,仅在 torch 分布式相关的深度学习用法里才需转写。可以用来获取参与分布式训练的进程总数,以及获取当前进程的 rank。 ### 转写示例 - ```python # PyTorch 写法 os.environ.get(key) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/setuptools.setup.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/setuptools.setup.md index 3e459df8b06..df3be8c78f2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/setuptools.setup.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/setuptools.setup.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]setuptools.setup - ### [setuptools.setup](https://setuptools.pypa.io/en/latest/userguide/quickstart.html) - ```python setuptools.setup(*args, **attrs) ``` @@ -9,7 +7,6 @@ setuptools.setup(*args, **attrs) Paddle 无此 API,需要组合实现。该 API 一般情况下与 Paddle 无关,仅在与 torch 相关的深度学习用法里才需要转写,用来构建一个包含自定义扩展(如 C++ )的 PyTorch 包。 ### 转写示例 - ```python # PyTorch 写法 setuptools.setup(*args, **attrs) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Generator.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Generator.md index 1d50e9f0bfd..d8fab404a79 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Generator.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Generator.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.Generator - +## [ 组合替代实现 ]torch.Generator ### [torch.Generator](https://pytorch.org/docs/stable/generated/torch.Generator.html#generator) - ```python torch.Generator(device='cpu') ``` @@ -9,7 +7,6 @@ torch.Generator(device='cpu') Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.Generator() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.H.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.H.md index 0c6954dc3a6..a540650ed9e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.H.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.H.md @@ -1,7 +1,5 @@ -## [ 组合替代实现 ] torch.Tensor.H - +## [ 组合替代实现 ]torch.Tensor.H ### [torch.Tensor.H](https://pytorch.org/docs/stable/tensors.html?#torch.Tensor.H) - ```python torch.Tensor.H ``` @@ -11,7 +9,6 @@ PyTorch 中等于 x.transpose(0, 1).conj(),Paddle 中 transpose 参数 perm 该 API 仅针对 2D。 ### 转写示例 - ```python # PyTorch 写法 y = x.H diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addbmm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addbmm.md index f5776672cbb..7fbacf8711e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addbmm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addbmm.md @@ -1,14 +1,11 @@ ## [ 组合替代实现 ]torch.Tensor.addbmm - ### [torch.Tensor.addbmm](https://pytorch.org/docs/stable/generated/torch.Tensor.addbmm.html#torch.Tensor.addbmm) - ```python torch.Tensor.addbmm(batch1, batch2, *, beta=1, alpha=1) ``` Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = input.addbmm(batch1, batch2, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addbmm_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addbmm_.md index f9906904680..5756781fee4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addbmm_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addbmm_.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.addbmm_ - ### [torch.Tensor.addbmm_](https://pytorch.org/docs/stable/generated/torch.Tensor.addbmm_.html#torch.Tensor.addbmm_) - ```python torch.Tensor.addbmm_(batch1, batch2, *, beta=1, alpha=1) ``` @@ -15,7 +13,6 @@ $$ Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 input.addbmm_(batch1, batch2, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcdiv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcdiv.md index cb94ea59559..cadb757b00d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcdiv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcdiv.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.addcdiv - ### [torch.Tensor.addcdiv](https://pytorch.org/docs/stable/generated/torch.Tensor.addcdiv.html#torch.Tensor.addcdiv) - ```python torch.Tensor.addcdiv(tensor1, tensor2, *, value=1) ``` @@ -12,8 +10,7 @@ $ out = input + value * (tensor1 / tensor2) $ PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 y = input.addcdiv(tensor1, tensor2, value=value) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcdiv_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcdiv_.md index 7362c1bf475..5f1df7bc890 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcdiv_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcdiv_.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.addcdiv_ - ### [torch.Tensor.addcdiv_](https://pytorch.org/docs/stable/generated/torch.Tensor.addcdiv_.html#torch.Tensor.addcdiv_) - ```python torch.Tensor.addcdiv_(tensor1, tensor2, *, value=1) ``` @@ -12,8 +10,7 @@ $ out = input + value * (tensor1 / tensor2) $ PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 input.addcdiv_(tensor1, tensor2, value=value) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcmul.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcmul.md index c7f327ecb12..48e11043f35 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcmul.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcmul.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.Tensor.addcmul - ### [torch.Tensor.addcmul](https://pytorch.org/docs/stable/generated/torch.Tensor.addcmul.html#torch.Tensor.addcmul) ```python torch.Tensor.addcmul(tensor1, tensor2, *, value=1) @@ -11,8 +10,7 @@ $ out = input + value * tensor1 * tensor2 $ PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 y = input.addcmul(tensor1, tensor2, value=value) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcmul_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcmul_.md index 622691b1dbe..325ebf6025a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcmul_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addcmul_.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.Tensor.addcmul_ - ### [torch.Tensor.addcmul_](https://pytorch.org/docs/stable/generated/torch.Tensor.addcmul_.html#torch-tensor-addcmul) ```python torch.Tensor.addcmul_(tensor1, tensor2, *, value=1) @@ -11,8 +10,7 @@ $ out = input + value * tensor1 * tensor2 $ PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 input.addcmul_(tensor1, tensor2, value=value) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addmv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addmv.md index 8f752852f85..e63d4406748 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addmv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addmv.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.Tensor.addmv - ### [torch.Tensor.addmv](https://pytorch.org/docs/stable/generated/torch.Tensor.addmv.html#torch.Tensor.addmv) ```python torch.Tensor.addmv(mat, vec, beta=1, alpha=1, out=None) @@ -8,7 +7,6 @@ torch.Tensor.addmv(mat, vec, beta=1, alpha=1, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = input.addmv(mat, vec, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addmv_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addmv_.md index 5e16b630f76..d96a86abdc9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addmv_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addmv_.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.Tensor.addmv_ - ### [torch.Tensor.addmv_](https://pytorch.org/docs/stable/generated/torch.Tensor.addmv_.html#torch.Tensor.addmv_) ```python torch.Tensor.addmv_(mat, vec, beta=1, alpha=1, out=None) @@ -8,7 +7,6 @@ torch.Tensor.addmv_(mat, vec, beta=1, alpha=1, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 input.addmv_(mat, vec, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addr.md index 41340c3e235..a9d2e51d45f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addr.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.addr - ### [torch.Tensor.addr](https://pytorch.org/docs/stable/generated/torch.Tensor.addr.html#torch.Tensor.addr) - ```python torch.Tensor.addr(vec1, vec2, beta=1, alpha=1) ``` @@ -9,7 +7,6 @@ torch.Tensor.addr(vec1, vec2, beta=1, alpha=1) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = input.addr(vec1, vec2, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addr_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addr_.md index ca21c894e3f..baaccac57ad 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addr_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.addr_.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.addr_ - ### [torch.Tensor.addr_](https://pytorch.org/docs/stable/generated/torch.Tensor.addr_.html#torch.Tensor.addr_) - ```python torch.Tensor.addr_(vec1, vec2, beta=1, alpha=1) ``` @@ -9,7 +7,6 @@ torch.Tensor.addr_(vec1, vec2, beta=1, alpha=1) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = input.addr_(vec1, vec2, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.adjoint.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.adjoint.md index 8c331a1d9c2..83a4df5a340 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.adjoint.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.adjoint.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.Tensor.adjoint - ### [torch.Tensor.adjoint](https://pytorch.org/docs/stable/generated/torch.Tensor.adjoint.html#torch.Tensor.adjoint) ```python torch.Tensor.adjoint() @@ -8,7 +7,6 @@ torch.Tensor.adjoint() Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = input.adjoint() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.aminmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.aminmax.md index ac723d0c8eb..80682b05c20 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.aminmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.aminmax.md @@ -1,14 +1,11 @@ ## [ 组合替代实现 ]torch.Tensor.aminmax - ### [torch.Tensor.aminmax](https://pytorch.org/docs/stable/generated/torch.Tensor.aminmax.html#torch.Tensor.aminmax) - ```python torch.Tensor.aminmax(*, dim=None, keepdim=False) ``` Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 input.aminmax(dim=-1, keepdim=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.dim_order.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.dim_order.md index a71aa26a485..3e17531785e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.dim_order.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.dim_order.md @@ -1,7 +1,5 @@ -## [ 组合替代实现 ] torch.Tensor.dim_order - +## [ 组合替代实现 ]torch.Tensor.dim_order ### [torch.Tensor.dim_order](https://pytorch.org/docs/stable/generated/torch.Tensor.dim_order.html?highlight=dim_order#torch.Tensor.dim_order) - ```python torch.Tensor.dim_order() ``` @@ -9,7 +7,6 @@ torch.Tensor.dim_order() Paddle 无此 API,需要组合实现。获取张量在内存中的物理布局,PaddlePaddle 的 Tensor 默认是 contiguous 的, 因此可直接返回一个从 0 到 Tensor 的维度长度的列表即可。 ### 转写示例 - ```python # PyTorch 写法 y = x.dim_order() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.erfc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.erfc.md index e8444889565..4c4ff5a71ea 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.erfc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.erfc.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.erfc - ### [torch.Tensor.erfc](https://pytorch.org/docs/stable/generated/torch.Tensor.erfc.html) - ```python torch.Tensor.erfc() ``` @@ -9,7 +7,6 @@ torch.Tensor.erfc() Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = x.erfc() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.erfc_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.erfc_.md index 41d7ed7fe35..b1d8f2c9a22 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.erfc_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.erfc_.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.erfc_ - ### [torch.Tensor.erfc_](https://pytorch.org/docs/stable/generated/torch.Tensor.erfc_.html) - ```python torch.Tensor.erfc_() ``` @@ -9,7 +7,6 @@ torch.Tensor.erfc_() Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 x.erfc_() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.float_power.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.float_power.md index e43a2f76b25..33d48c957ab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.float_power.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.float_power.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.Tensor.float_power - +## [ 组合替代实现 ]torch.Tensor.float_power ### [torch.Tensor.float_power](https://pytorch.org/docs/stable/generated/torch.Tensor.float_power.html#torch.Tensor.float_power) - ```python torch.Tensor.float_power(exponent) ``` @@ -9,7 +7,6 @@ torch.Tensor.float_power(exponent) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = x.float_power(y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.float_power_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.float_power_.md index c994d34531f..f0dea54dfd6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.float_power_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.float_power_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.Tensor.float_power_ - +## [ 组合替代实现 ]torch.Tensor.float_power_ ### [torch.Tensor.float_power_](https://pytorch.org/docs/stable/generated/torch.Tensor.float_power_.html#torch.Tensor.float_power_) - ```python torch.Tensor.float_power_(exponent) ``` @@ -9,7 +7,6 @@ torch.Tensor.float_power_(exponent) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = x.float_power_(2) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.histogram.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.histogram.md index fd4fca29608..89d6b7d2123 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.histogram.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.histogram.md @@ -1,13 +1,10 @@ ## [ 组合替代实现 ]torch.Tensor.histogram - ### [torch.Tensor.histogram](https://pytorch.org/docs/stable/generated/torch.Tensor.histogram.html#torch.Tensor.histogram) - ```python torch.Tensor.histogram(bins, *, range=None, weight=None, density=False) ``` ### [paddle.Tensor.histogram](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#histogram-bins-100-min-0-max-0) - ```python paddle.Tensor.histogram(bins=100, min=0.0, max=0.0, weight=None, density=False) ``` @@ -15,7 +12,6 @@ paddle.Tensor.histogram(bins=100, min=0.0, max=0.0, weight=None, density=False) 其中 PyTorch 的 `range` 与 Paddle 用法不一致,需要转写;且返回参数 Tensor 数量不一致,需要通过 paddle.Tensor.histogram 和 paddle.Tensor.histogram_bin_edges 组合实现。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------------------------------------------------- | | bins | bins | 直方图 bins(直条)的个数。 | @@ -25,9 +21,7 @@ paddle.Tensor.histogram(bins=100, min=0.0, max=0.0, weight=None, density=False) | 返回值 | 返回值 | PyTorch 返回 hist 和 bin_edges,返回值 dtype 类型与 self 一致,paddle.Tensor.histogram 返回 hist,返回值 dtype 类型为 int64 或 float32,paddle.Tensor.histogram_bin_edges 返回 bin_edges,返回值 dtype 类型为 float32,需要转写。 | ### 转写示例 - #### range 参数:bins 的范围 - ```python # PyTorch 写法: x = torch.tensor([1., 2, 1]) @@ -39,7 +33,6 @@ hist = x.histogram(bins=5, min=0., max=3.) ``` #### 返回值:数量 - ```python # PyTorch 写法: x = torch.tensor([1., 2, 1]) @@ -51,7 +44,6 @@ hist, bin_edges = x.histogram(x, bins=5), x.histogram_bin_edges(x, bins=5) ``` #### 返回值:dtype 类型 - ```python # PyTorch 写法: x = torch.tensor([1., 2, 1]) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.index_copy_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.index_copy_.md index 3faf9641d21..05dfc68ab0e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.index_copy_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.index_copy_.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.index_copy_ - ### [torch.Tensor.index_copy_](https://pytorch.org/docs/stable/generated/torch.Tensor.index_copy_.html) - ```python torch.Tensor.index_copy_(dim, index, source) ``` @@ -9,7 +7,6 @@ torch.Tensor.index_copy_(dim, index, source) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法,dim=0 y = x.index_copy_(0, index, source) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.is_signed.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.is_signed.md index af8149d1f81..1353db1b6bf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.is_signed.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.is_signed.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.is_signed - ### [torch.Tensor.is_signed](https://pytorch.org/docs/stable/generated/torch.Tensor.is_signed.html#torch.Tensor.is_signed) - ```python torch.Tensor.is_signed() ``` @@ -9,7 +7,6 @@ torch.Tensor.is_signed() Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = x.is_signed() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.logaddexp2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.logaddexp2.md index e41582af1e1..5301b03bc68 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.logaddexp2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.logaddexp2.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.logaddexp2 - ### [torch.Tensor.logaddexp2](https://pytorch.org/docs/stable/generated/torch.Tensor.logaddexp2.html#torch.Tensor.logaddexp2) - ```python torch.Tensor.logaddexp2(other) ``` @@ -9,7 +7,6 @@ torch.Tensor.logaddexp2(other) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = a.logaddexp2(b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.logdet.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.logdet.md index 7e0d5c15b8f..f4519320837 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.logdet.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.logdet.md @@ -1,14 +1,11 @@ ## [ 组合替代实现 ]torch.Tensor.logdet - ### [torch.Tensor.logdet](https://pytorch.org/docs/stable/generated/torch.Tensor.logdet.html#torch.Tensor.logdet) - ```python torch.Tensor.logdet() ``` Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = input.logdet() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.mH.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.mH.md index d236bb96d10..a67f88fae97 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.mH.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.mH.md @@ -1,7 +1,5 @@ -## [ 组合替代实现 ] torch.Tensor.mH - +## [ 组合替代实现 ]torch.Tensor.mH ### [torch.Tensor.mH](https://pytorch.org/docs/stable/tensors.html?#torch.Tensor.mH) - ```python torch.Tensor.mH ``` @@ -10,7 +8,6 @@ Paddle 无此 API,需要组合实现。 PyTorch 中等于 x.transpose(-2, -1).conj(),Paddle 中 transpose 参数 perm 为转换后的维度位置。 ### 转写示例 - ```python # 假设 x 为 4D # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.narrow_copy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.narrow_copy.md index 7abc0c71cdc..308f51caeee 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.narrow_copy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.narrow_copy.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.narrow_copy - ### [torch.Tensor.narrow_copy](https://pytorch.org/docs/stable/generated/torch.Tensor.narrow_copy.html#torch.Tensor.narrow_copy) - ```python torch.Tensor.narrow_copy(dimension, start, length) ``` @@ -9,7 +7,6 @@ torch.Tensor.narrow_copy(dimension, start, length) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = a.narrow_copy(1, 1, 4) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.nbytes.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.nbytes.md index 34f171c46b9..9340a9a3daf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.nbytes.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.nbytes.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.nbytes - ### [torch.Tensor.nbytes](https://pytorch.org/docs/stable/generated/torch.Tensor.nbytes.html) - ```python torch.Tensor.nbytes ``` @@ -9,7 +7,6 @@ torch.Tensor.nbytes Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = a.nbytes diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.requires_grad_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.requires_grad_.md index 282d0c2ff82..0074ec532bd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.requires_grad_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.requires_grad_.md @@ -1,13 +1,10 @@ -## [组合替代实现]torch.Tensor.requires_grad_ - +## [ 组合替代实现 ]torch.Tensor.requires_grad_ ### [torch.Tensor.requires_grad_](https://pytorch.org/docs/stable/generated/torch.Tensor.requires_grad_.html?highlight=requires_grad_#torch.Tensor.requires_grad_) - ```python torch.Tensor.requires_grad_(requires_grad=True) ``` ### [paddle.Tensor.stop_gradient](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#stop-gradient) - ```python paddle.Tensor.stop_gradient = False ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.reshape_as.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.reshape_as.md index ac8243d4c66..da493a19e17 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.reshape_as.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.reshape_as.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.reshape_as - ### [torch.Tensor.reshape_as](https://pytorch.org/docs/stable/generated/torch.Tensor.reshape_as.html#torch.Tensor.reshape_as) - ```python torch.Tensor.reshape_as(other) ``` @@ -9,7 +7,6 @@ torch.Tensor.reshape_as(other) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = a.reshape_as(b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.resize_as_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.resize_as_.md index 3f4e49150b8..81b16b1c802 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.resize_as_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.resize_as_.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.resize_as_ - ### [torch.Tensor.resize_as_](https://pytorch.org/docs/stable/generated/torch.Tensor.resize_as_.html?highlight=resize_as#torch.Tensor.resize_as_) - ```python # PyTorch 文档有误,测试第一个参数为 the_template torch.Tensor.resize_as_(the_template, memory_format=torch.contiguous_format) @@ -10,7 +8,6 @@ torch.Tensor.resize_as_(the_template, memory_format=torch.contiguous_format) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = a.resize_as_(b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.select.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.select.md index eeefec672b6..76d277e9f6d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.select.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.select.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.select - ### [torch.Tensor.select](https://pytorch.org/docs/stable/generated/torch.Tensor.select.html?highlight=select#torch.Tensor.select) - ```python torch.Tensor.select(dim, index) ``` @@ -9,7 +7,6 @@ torch.Tensor.select(dim, index) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = a.select(dim=dim, index=index) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.xlogy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.xlogy.md index 051e248939a..06b72596ce7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.xlogy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.xlogy.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.xlogy - ### [torch.Tensor.xlogy](https://pytorch.org/docs/stable/generated/torch.Tensor.xlogy.html#torch.Tensor.xlogy) - ```python torch.Tensor.xlogy(other) ``` @@ -9,7 +7,6 @@ torch.Tensor.xlogy(other) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = a.xlogy(b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.xlogy_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.xlogy_.md index af3d6c069de..d08c7a1f449 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.xlogy_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.xlogy_.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.xlogy_ - ### [torch.Tensor.xlogy_](https://pytorch.org/docs/stable/generated/torch.Tensor.xlogy_.html#torch.Tensor.xlogy_) - ```python torch.Tensor.xlogy_(other) ``` @@ -9,7 +7,6 @@ torch.Tensor.xlogy_(other) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 a.xlogy_(b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._assert.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._assert.md index 8c19b044631..3cca37f9bee 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._assert.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._assert.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch._assert - ### [torch._assert](https://pytorch.org/docs/stable/generated/torch._assert.html) - ```python torch._assert(condition, message) ``` @@ -9,7 +7,6 @@ torch._assert(condition, message) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._assert(condition=1==2, message='error messege') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_abs.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_abs.md index a5cd941f425..d23e81af350 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_abs.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_abs.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_abs - +## [ 组合替代实现 ]torch.\_foreach_abs ### [torch.\_foreach_abs](https://pytorch.org/docs/stable/generated/torch._foreach_abs.html#torch-foreach-abs) - ```python torch._foreach_abs(self) ``` @@ -9,7 +7,6 @@ torch._foreach_abs(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_abs(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_abs_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_abs_.md index c042098546e..54b176ba759 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_abs_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_abs_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_abs_ - +## [ 组合替代实现 ]torch.\_foreach_abs_ ### [torch.\_foreach_abs_](https://pytorch.org/docs/stable/generated/torch._foreach_abs_.html#torch-foreach-abs) - ```python torch._foreach_abs_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_abs_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_abs_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_acos.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_acos.md index 26388d16fb1..58c74050a1a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_acos.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_acos.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_acos - +## [ 组合替代实现 ]torch.\_foreach_acos ### [torch.\_foreach_acos](https://pytorch.org/docs/stable/generated/torch._foreach_acos.html#torch-foreach-acos) - ```python torch._foreach_acos(self) ``` @@ -9,7 +7,6 @@ torch._foreach_acos(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_acos(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_acos_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_acos_.md index 1d3a948cd8b..47baa24c39a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_acos_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_acos_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_acos_ - +## [ 组合替代实现 ]torch.\_foreach_acos_ ### [torch.\_foreach_acos_](https://pytorch.org/docs/stable/generated/torch._foreach_acos_.html#torch-foreach-acos) - ```python torch._foreach_acos_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_acos_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_acos_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_asin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_asin.md index 947dfb9143d..758c080eb29 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_asin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_asin.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_asin - +## [ 组合替代实现 ]torch.\_foreach_asin ### [torch.\_foreach_asin](https://pytorch.org/docs/stable/generated/torch._foreach_asin.html#torch-foreach-asin) - ```python torch._foreach_asin(self) ``` @@ -9,7 +7,6 @@ torch._foreach_asin(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_asin(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_asin_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_asin_.md index b0681f6b38d..0010ce6bbab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_asin_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_asin_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_asin_ - +## [ 组合替代实现 ]torch.\_foreach_asin_ ### [torch.\_foreach_asin_](https://pytorch.org/docs/stable/generated/torch._foreach_asin_.html#torch-foreach-asin) - ```python torch._foreach_asin_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_asin_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_asin_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_atan.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_atan.md index 309375b63f3..6a49abb0e12 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_atan.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_atan.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_atan - +## [ 组合替代实现 ]torch.\_foreach_atan ### [torch.\_foreach_atan](https://pytorch.org/docs/stable/generated/torch._foreach_atan.html#torch-foreach-atan) - ```python torch._foreach_atan(self) ``` @@ -9,7 +7,6 @@ torch._foreach_atan(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_atan(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_atan_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_atan_.md index 5816dca2257..da14659a4b8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_atan_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_atan_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_atan_ - +## [ 组合替代实现 ]torch.\_foreach_atan_ ### [torch.\_foreach_atan_](https://pytorch.org/docs/stable/generated/torch._foreach_atan_.html#torch-foreach-atan) - ```python torch._foreach_atan_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_atan_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_atan_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_ceil.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_ceil.md index 887efbdab19..71eed2188be 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_ceil.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_ceil.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_ceil - +## [ 组合替代实现 ]torch.\_foreach_ceil ### [torch.\_foreach_ceil](https://pytorch.org/docs/stable/generated/torch._foreach_ceil.html#torch-foreach-ceil) - ```python torch._foreach_ceil(self) ``` @@ -9,7 +7,6 @@ torch._foreach_ceil(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_ceil(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_ceil_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_ceil_.md index 43a949e4e31..846d4d8a8ed 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_ceil_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_ceil_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_ceil_ - +## [ 组合替代实现 ]torch.\_foreach_ceil_ ### [torch.\_foreach_ceil_](https://pytorch.org/docs/stable/generated/torch._foreach_ceil_.html#torch-foreach-ceil) - ```python torch._foreach_ceil_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_ceil_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_ceil_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cos.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cos.md index 5c4a79ca6c9..1fdb2f5544f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cos.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cos.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_cos - +## [ 组合替代实现 ]torch.\_foreach_cos ### [torch.\_foreach_cos](https://pytorch.org/docs/stable/generated/torch._foreach_cos.html#torch-foreach-cos) - ```python torch._foreach_cos(self) ``` @@ -9,7 +7,6 @@ torch._foreach_cos(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_cos(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cos_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cos_.md index d84b577c229..f1417ae8b66 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cos_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cos_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_cos_ - +## [ 组合替代实现 ]torch.\_foreach_cos_ ### [torch.\_foreach_cos_](https://pytorch.org/docs/stable/generated/torch._foreach_cos_.html#torch-foreach-cos) - ```python torch._foreach_cos_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_cos_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_cos_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cosh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cosh.md index 10152f0a7c4..7314424c101 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cosh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cosh.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_cosh - +## [ 组合替代实现 ]torch.\_foreach_cosh ### [torch.\_foreach_cosh](https://pytorch.org/docs/stable/generated/torch._foreach_cosh.html#torch-foreach-cosh) - ```python torch._foreach_cosh(self) ``` @@ -9,7 +7,6 @@ torch._foreach_cosh(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_cosh(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cosh_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cosh_.md index 11ffca5a1c6..1411815c2d9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cosh_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_cosh_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_cosh_ - +## [ 组合替代实现 ]torch.\_foreach_cosh_ ### [torch.\_foreach_cosh_](https://pytorch.org/docs/stable/generated/torch._foreach_cosh_.html#torch-foreach-cosh) - ```python torch._foreach_cosh_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_cosh_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_cosh_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erf.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erf.md index 954fb7242e1..e389232f26f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erf.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erf.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_erf - +## [ 组合替代实现 ]torch.\_foreach_erf ### [torch.\_foreach_erf](https://pytorch.org/docs/stable/generated/torch._foreach_erf.html#torch-foreach-erf) - ```python torch._foreach_erf(self) ``` @@ -9,7 +7,6 @@ torch._foreach_erf(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_erf(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erf_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erf_.md index fe3474866f5..c421b9f1d7a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erf_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erf_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_erf_ - +## [ 组合替代实现 ]torch.\_foreach_erf_ ### [torch.\_foreach_erf_](https://pytorch.org/docs/stable/generated/torch._foreach_erf_.html#torch-foreach-erf) - ```python torch._foreach_erf_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_erf_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_erf_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erfc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erfc.md index 7b544db125b..ac9a8c396d1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erfc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erfc.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_erfc - +## [ 组合替代实现 ]torch.\_foreach_erfc ### [torch.\_foreach_erfc](https://pytorch.org/docs/stable/generated/torch._foreach_erfc.html#torch-foreach-erfc) - ```python torch._foreach_erfc(self) ``` @@ -9,7 +7,6 @@ torch._foreach_erfc(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_erfc(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erfc_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erfc_.md index 7f83684d46d..b3a1ee72ef7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erfc_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_erfc_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_erfc_ - +## [ 组合替代实现 ]torch.\_foreach_erfc_ ### [torch.\_foreach_erfc_](https://pytorch.org/docs/stable/generated/torch._foreach_erfc_.html#torch-foreach-erfc) - ```python torch._foreach_erfc_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_erfc_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_erfc_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_exp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_exp.md index 01de5e7a2dd..9e28eadeabe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_exp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_exp.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_exp - +## [ 组合替代实现 ]torch.\_foreach_exp ### [torch.\_foreach_exp](https://pytorch.org/docs/stable/generated/torch._foreach_exp.html#torch-foreach-exp) - ```python torch._foreach_exp(self) ``` @@ -9,7 +7,6 @@ torch._foreach_exp(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_exp(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_exp_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_exp_.md index f65bfbda718..de4ba5c1179 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_exp_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_exp_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_exp_ - +## [ 组合替代实现 ]torch.\_foreach_exp_ ### [torch.\_foreach_exp_](https://pytorch.org/docs/stable/generated/torch._foreach_exp_.html#torch._foreach_exp_) - ```python torch._foreach_exp_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_exp_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_exp_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_expm1.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_expm1.md index 91df5649ece..74fadcda8cb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_expm1.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_expm1.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_expm1 - +## [ 组合替代实现 ]torch.\_foreach_expm1 ### [torch.\_foreach_expm1](https://pytorch.org/docs/stable/generated/torch._foreach_expm1.html#torch-foreach-expm1) - ```python torch._foreach_expm1(self) ``` @@ -9,7 +7,6 @@ torch._foreach_expm1(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_expm1(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_expm1_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_expm1_.md index d58b0619ddf..d3f9d6b6aa0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_expm1_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_expm1_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_expm1_ - +## [ 组合替代实现 ]torch.\_foreach_expm1_ ### [torch.\_foreach_expm1_](https://pytorch.org/docs/stable/generated/torch._foreach_expm1_.html) - ```python torch._foreach_expm1_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_expm1_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_expm1_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_floor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_floor.md index 65784fd9b04..06366801663 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_floor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_floor.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_floor - +## [ 组合替代实现 ]torch.\_foreach_floor ### [torch.\_foreach_floor](https://pytorch.org/docs/stable/generated/torch._foreach_floor.html) - ```python torch._foreach_floor(self) ``` @@ -9,7 +7,6 @@ torch._foreach_floor(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_floor(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_floor_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_floor_.md index f69d1e66914..2009f956450 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_floor_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_floor_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_floor_ - +## [ 组合替代实现 ]torch.\_foreach_floor_ ### [torch.\_foreach_floor_](https://pytorch.org/docs/stable/generated/torch._foreach_floor_.html#torch-foreach-floor) - ```python torch._foreach_floor_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_floor_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_floor_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_frac.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_frac.md index f619b398d75..c50315993ff 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_frac.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_frac.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_frac - +## [ 组合替代实现 ]torch.\_foreach_frac ### [torch.\_foreach_frac](https://pytorch.org/docs/stable/generated/torch._foreach_frac.html#torch-foreach-frac) - ```python torch._foreach_frac(self) ``` @@ -9,7 +7,6 @@ torch._foreach_frac(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_frac(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_frac_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_frac_.md index 8589b3e9d1c..76fd6d35494 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_frac_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_frac_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_frac_ - +## [ 组合替代实现 ]torch.\_foreach_frac_ ### [torch.\_foreach_frac_](https://pytorch.org/docs/stable/generated/torch._foreach_frac_.html#torch-foreach-frac) - ```python torch._foreach_frac_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_frac_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_frac_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_lgamma.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_lgamma.md index 456cb257e98..48094a30eeb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_lgamma.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_lgamma.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_lgamma - +## [ 组合替代实现 ]torch.\_foreach_lgamma ### [torch.\_foreach_lgamma](https://pytorch.org/docs/stable/generated/torch._foreach_lgamma.html#torch-foreach-lgamma) - ```python torch._foreach_lgamma(self) ``` @@ -9,7 +7,6 @@ torch._foreach_lgamma(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_lgamma(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_lgamma_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_lgamma_.md index a8e962ff331..08bf41f42bc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_lgamma_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_lgamma_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_lgamma_ - +## [ 组合替代实现 ]torch.\_foreach_lgamma_ ### [torch.\_foreach_lgamma_](https://pytorch.org/docs/stable/generated/torch._foreach_lgamma_.html#torch-foreach-lgamma) - ```python torch._foreach_lgamma_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_lgamma_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_lgamma_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log.md index d5bbcf37009..59055418bef 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_log - +## [ 组合替代实现 ]torch.\_foreach_log ### [torch.\_foreach_log](https://pytorch.org/docs/stable/generated/torch._foreach_log.html#torch-foreach-log) - ```python torch._foreach_log(self) ``` @@ -9,7 +7,6 @@ torch._foreach_log(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_log(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log10.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log10.md index b722d6d6c4c..dba849b4ec2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log10.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log10.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_log10 - +## [ 组合替代实现 ]torch.\_foreach_log10 ### [torch.\_foreach_log10](https://pytorch.org/docs/stable/generated/torch._foreach_log10.html#torch-foreach-log10) - ```python torch._foreach_log10(self) ``` @@ -9,7 +7,6 @@ torch._foreach_log10(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_log10(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log10_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log10_.md index 4477f9195dc..7fbcee94de7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log10_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log10_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_log10_ - +## [ 组合替代实现 ]torch.\_foreach_log10_ ### [torch.\_foreach_log10_](https://pytorch.org/docs/stable/generated/torch._foreach_log10_.html#torch-foreach-log10) - ```python torch._foreach_log10_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_log10_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_log10_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log1p.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log1p.md index 67f2db353cd..50ec12e65d4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log1p.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log1p.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_log1p - +## [ 组合替代实现 ]torch.\_foreach_log1p ### [torch.\_foreach_log1p](https://pytorch.org/docs/stable/generated/torch._foreach_log1p.html#torch-foreach-log1p) - ```python torch._foreach_log1p(self) ``` @@ -9,7 +7,6 @@ torch._foreach_log1p(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_log1p(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log1p_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log1p_.md index ea228dec72e..4a613b8cde1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log1p_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log1p_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_log1p_ - +## [ 组合替代实现 ]torch.\_foreach_log1p_ ### [torch.\_foreach_log1p_](https://pytorch.org/docs/stable/generated/torch._foreach_log1p_.html#torch-foreach-log1p) - ```python torch._foreach_log1p_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_log1p_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_log1p_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log2.md index 793103f27c0..daf8723b60c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log2.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_log2 - +## [ 组合替代实现 ]torch.\_foreach_log2 ### [torch.\_foreach_log2](https://pytorch.org/docs/stable/generated/torch._foreach_log2.html#torch-foreach-log2) - ```python torch._foreach_log2(self) ``` @@ -9,7 +7,6 @@ torch._foreach_log2(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_log2(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log2_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log2_.md index 24e8739a1e2..b1efc20e404 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log2_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log2_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_log2_ - +## [ 组合替代实现 ]torch.\_foreach_log2_ ### [torch.\_foreach_log2_](https://pytorch.org/docs/stable/generated/torch._foreach_log2_.html#torch-foreach-log2) - ```python torch._foreach_log2_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_log2_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_log2_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log_.md index bd6611da00e..47ac44569e1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_log_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_log_ - +## [ 组合替代实现 ]torch.\_foreach_log_ ### [torch.\_foreach_log_](https://pytorch.org/docs/stable/generated/torch._foreach_log_.html#torch-foreach-log) - ```python torch._foreach_log_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_log_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_log_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_neg.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_neg.md index f1680953a9e..c4b95c04e13 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_neg.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_neg.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_neg - +## [ 组合替代实现 ]torch.\_foreach_neg ### [torch.\_foreach_neg](https://pytorch.org/docs/stable/generated/torch._foreach_neg.html#torch-foreach-neg) - ```python torch._foreach_neg(self) ``` @@ -9,7 +7,6 @@ torch._foreach_neg(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_neg(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_neg_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_neg_.md index ec57a257c29..e7861ddbc0c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_neg_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_neg_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_neg_ - +## [ 组合替代实现 ]torch.\_foreach_neg_ ### [torch.\_foreach_neg_](https://pytorch.org/docs/stable/generated/torch._foreach_neg_.html#torch-foreach-neg) - ```python torch._foreach_neg_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_neg_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_neg_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_reciprocal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_reciprocal.md index 0e0f0cb1f38..8622a9521f9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_reciprocal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_reciprocal.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_reciprocal - +## [ 组合替代实现 ]torch.\_foreach_reciprocal ### [torch.\_foreach_reciprocal](https://pytorch.org/docs/stable/generated/torch._foreach_reciprocal.html#torch-foreach-reciprocal) - ```python torch._foreach_reciprocal(self) ``` @@ -9,7 +7,6 @@ torch._foreach_reciprocal(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_reciprocal(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_reciprocal_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_reciprocal_.md index 146710e0bbc..db67872926a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_reciprocal_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_reciprocal_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_reciprocal_ - +## [ 组合替代实现 ]torch.\_foreach_reciprocal_ ### [torch.\_foreach_reciprocal_](https://pytorch.org/docs/stable/generated/torch._foreach_reciprocal_.html#torch-foreach-reciprocal) - ```python torch._foreach_reciprocal_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_reciprocal_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_reciprocal_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_round.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_round.md index da0d739f6cb..6d0e1126200 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_round.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_round.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_round - +## [ 组合替代实现 ]torch.\_foreach_round ### [torch.\_foreach_round](https://pytorch.org/docs/stable/generated/torch._foreach_round.html#torch-foreach-round) - ```python torch._foreach_round(self) ``` @@ -9,7 +7,6 @@ torch._foreach_round(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_round(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_round_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_round_.md index f7bc6134aba..5f1009fd722 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_round_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_round_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_round_ - +## [ 组合替代实现 ]torch.\_foreach_round_ ### [torch.\_foreach_round_](https://pytorch.org/docs/stable/generated/torch._foreach_round_.html#torch-foreach-round) - ```python torch._foreach_round_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_round_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_round_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sigmoid.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sigmoid.md index b516e2bfa33..ea86dd19518 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sigmoid.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sigmoid.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_sigmoid - +## [ 组合替代实现 ]torch.\_foreach_sigmoid ### [torch.\_foreach_sigmoid](https://pytorch.org/docs/stable/generated/torch._foreach_sigmoid.html#torch-foreach-sigmoid) - ```python torch._foreach_sigmoid(self) ``` @@ -9,7 +7,6 @@ torch._foreach_sigmoid(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_sigmoid(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sigmoid_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sigmoid_.md index 55d4fb3a0db..5c773adc0fc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sigmoid_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sigmoid_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_sigmoid_ - +## [ 组合替代实现 ]torch.\_foreach_sigmoid_ ### [torch.\_foreach_sigmoid_](https://pytorch.org/docs/stable/generated/torch._foreach_sigmoid_.html#torch-foreach-sigmoid) - ```python torch._foreach_sigmoid_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_sigmoid_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_sigmoid_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sin.md index 0446c7f5cea..b57a689a0bf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sin.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_sin - +## [ 组合替代实现 ]torch.\_foreach_sin ### [torch.\_foreach_sin](https://docs.pytorch.org/docs/stable/generated/torch._foreach_sin.html#torch-foreach-sin) - ```python torch._foreach_sin(self) ``` @@ -9,7 +7,6 @@ torch._foreach_sin(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_sin(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sin_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sin_.md index c7c06746c8e..5ca1ee245f1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sin_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sin_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_sin_ - +## [ 组合替代实现 ]torch.\_foreach_sin_ ### [torch.\_foreach_sin_](https://pytorch.org/docs/stable/generated/torch._foreach_sin_.html#torch-foreach-sin) - ```python torch._foreach_sin_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_sin_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_sin_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sinh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sinh.md index 6c0d6cc47cd..5ca89e6ff56 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sinh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sinh.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_sinh - +## [ 组合替代实现 ]torch.\_foreach_sinh ### [torch.\_foreach_sinh](https://pytorch.org/docs/stable/generated/torch._foreach_sinh.html#torch-foreach-sinh) - ```python torch._foreach_sinh(self) ``` @@ -9,7 +7,6 @@ torch._foreach_sinh(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_sinh(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sinh_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sinh_.md index 058381bb1bd..74dca35c3c8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sinh_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sinh_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_sinh_ - +## [ 组合替代实现 ]torch.\_foreach_sinh_ ### [torch.\_foreach_sinh_](https://pytorch.org/docs/stable/generated/torch._foreach_sinh_.html#torch-foreach-sinh) - ```python torch._foreach_sinh_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_sinh_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_sinh_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sqrt.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sqrt.md index d884e36b694..3d05bbd92e3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sqrt.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sqrt.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_sqrt - +## [ 组合替代实现 ]torch.\_foreach_sqrt ### [torch.\_foreach_sqrt](https://pytorch.org/docs/stable/generated/torch._foreach_sqrt.html#torch-foreach-sqrt) - ```python torch._foreach_sqrt(self) ``` @@ -9,7 +7,6 @@ torch._foreach_sqrt(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_sqrt(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sqrt_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sqrt_.md index 5c765509807..1031670ac5d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sqrt_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_sqrt_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_sqrt_ - +## [ 组合替代实现 ]torch.\_foreach_sqrt_ ### [torch.\_foreach_sqrt_](https://docs.pytorch.org/docs/stable/generated/torch._foreach_sqrt_.html#torch-foreach-sqrt) - ```python torch._foreach_sqrt_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_sqrt_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_sqrt_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_tan.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_tan.md index 2226c7ea558..1e9f84cef69 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_tan.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_tan.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_tan - +## [ 组合替代实现 ]torch.\_foreach_tan ### [torch.\_foreach_tan](https://pytorch.org/docs/stable/generated/torch._foreach_tan.html#torch-foreach-tan) - ```python torch._foreach_tan(self) ``` @@ -9,7 +7,6 @@ torch._foreach_tan(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_tan(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_tan_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_tan_.md index 822aa40c410..ef1c7358b72 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_tan_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_tan_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_tan_ - +## [ 组合替代实现 ]torch.\_foreach_tan_ ### [torch.\_foreach_tan_](https://pytorch.org/docs/stable/generated/torch._foreach_tan_.html#torch-foreach-tan) - ```python torch._foreach_tan_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_tan_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_tan_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_trunc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_trunc.md index 49396412eaf..23266d13b74 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_trunc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_trunc.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_trunc - +## [ 组合替代实现 ]torch.\_foreach_trunc ### [torch.\_foreach_trunc](https://pytorch.org/docs/stable/generated/torch._foreach_trunc.html#torch-foreach-trunc) - ```python torch._foreach_trunc(self) ``` @@ -9,7 +7,6 @@ torch._foreach_trunc(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_trunc(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_trunc_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_trunc_.md index a8081b0e5c6..be07529108c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_trunc_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_trunc_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_trunc_ - +## [ 组合替代实现 ]torch.\_foreach_trunc_ ### [torch.\_foreach_trunc_](https://pytorch.org/docs/stable/generated/torch._foreach_trunc_.html#torch-foreach-trunc) - ```python torch._foreach_trunc_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_trunc_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_trunc_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_zero_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_zero_.md index 533d5ad0e73..66c389d910e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_zero_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch._foreach_zero_.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.\_foreach_zero_ - +## [ 组合替代实现 ]torch.\_foreach_zero_ ### [torch.\_foreach_zero_](https://pytorch.org/docs/stable/generated/torch._foreach_zero_.html#torch-foreach-zero) - ```python torch._foreach_zero_(self) ``` @@ -9,7 +7,6 @@ torch._foreach_zero_(self) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch._foreach_zero_(tensors) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addbmm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addbmm.md index 7541fd91ae6..5098a8b9e62 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addbmm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addbmm.md @@ -1,14 +1,11 @@ ## [ 组合替代实现 ]torch.addbmm - ### [torch.addbmm](https://pytorch.org/docs/stable/generated/torch.addbmm.html#torch.addbmm) - ```python torch.addbmm(input, batch1, batch2, *, beta=1, alpha=1, out=None) ``` Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.addbmm(input, batch1, batch2, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addcdiv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addcdiv.md index fa134b7e018..fb7b153ca6a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addcdiv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addcdiv.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.addcdiv - ### [torch.addcdiv](https://pytorch.org/docs/stable/generated/torch.addcdiv.html#torch.addcdiv) ```python torch.addcdiv(input, tensor1, tensor2, *, value=1, out=None) @@ -11,8 +10,7 @@ $ out = input + value * (tensor1 / tensor2) $ PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 y = torch.addcdiv(input, tensor1, tensor2, value=value) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addcmul.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addcmul.md index a14ba6e31c0..10b78b8772e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addcmul.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addcmul.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.addcmul - ### [torch.addcmul](https://pytorch.org/docs/stable/generated/torch.addcmul.html#torch.addcmul) ```python torch.addcmul(input, tensor1, tensor2, *, value=1, out=None) @@ -11,8 +10,7 @@ $ out = input + value * tensor1 * tensor2 $ PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 y = torch.addcmul(input, tensor1, tensor2, value=value) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addmv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addmv.md index 52122326596..e7c5811c512 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addmv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addmv.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.addmv - ### [torch.addmv](https://pytorch.org/docs/stable/generated/torch.addmv.html?highlight=addmv#torch.addmv) ```python torch.addmv(input, mat, vec, beta=1, alpha=1, out=None) @@ -8,7 +7,6 @@ torch.addmv(input, mat, vec, beta=1, alpha=1, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.addmv(input, mat, vec, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addr.md index defc99f3b43..c705ea3de2b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.addr.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.addr - ### [torch.addr](https://pytorch.org/docs/stable/generated/torch.addr.html?highlight=addr#torch.addr) - ```python torch.addr(input, vec1, vec2, beta=1, alpha=1, out=None) ``` @@ -9,7 +7,6 @@ torch.addr(input, vec1, vec2, beta=1, alpha=1, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.addr(input, vec1, vec2, beta=beta, alpha=alpha) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.adjoint.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.adjoint.md index e39791cf2e5..ecf05098913 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.adjoint.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.adjoint.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.adjoint - ### [torch.adjoint](https://pytorch.org/docs/stable/generated/torch.adjoint.html#torch.adjoint) ```python torch.adjoint(input) @@ -8,7 +7,6 @@ torch.adjoint(input) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.adjoint(input) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.aminmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.aminmax.md index df79e3eaada..c50c9d71a3c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.aminmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.aminmax.md @@ -1,14 +1,11 @@ ## [ 组合替代实现 ]torch.aminmax - ### [torch.aminmax](https://pytorch.org/docs/stable/generated/torch.aminmax.html#torch.aminmax) - ```python torch.aminmax(input, *, dim=None, keepdim=False, out=None) ``` Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.aminmax(input, dim=-1, keepdim=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.autograd.Variable.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.autograd.Variable.md index f1c0c04fdf0..68d278489c2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.autograd.Variable.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.autograd.Variable.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.autograd.Variable - ### [torch.autograd.Variable](https://pytorch.org/docs/stable/autograd.html#variable-deprecated) ```python torch.autograd.Variable(data, requires_grad=False) @@ -9,8 +8,7 @@ torch.autograd.Variable(data, requires_grad=False) PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 torch.autograd.Variable(data, requires_grad=False) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.backends.cudnn.is_available.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.backends.cudnn.is_available.md index 9ace0640470..3a5c1c04d38 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.backends.cudnn.is_available.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.backends.cudnn.is_available.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.backends.cudnn.is_available - ### [torch.backends.cudnn.is_available](https://pytorch.org/docs/stable/backends.html?highlight=torch+backends+cudnn+is_available#torch.backends.cudnn.is_available) ```python torch.backends.cudnn.is_available() @@ -9,7 +8,7 @@ torch.backends.cudnn.is_available() PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 +### 转写示例 ```python # PyTorch 写法 torch.backends.cudnn.is_available() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.can_cast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.can_cast.md index f386b54d197..c9453c62969 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.can_cast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.can_cast.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.can_cast - +## [ 组合替代实现 ]torch.can_cast ### [torch.can_cast](https://pytorch.org/docs/stable/generated/torch.can_cast.html#torch-can-cast) - ```python torch.can_cast(from_, to) ``` @@ -11,7 +9,6 @@ torch.can_cast(from_, to) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.can_cast(x, y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.chain_matmul.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.chain_matmul.md index 597a5d120bf..b582094e892 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.chain_matmul.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.chain_matmul.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.chain_matmul - ### [torch.chain_matmul](https://pytorch.org/docs/stable/generated/torch.chain_matmul.html?highlight=chain_matmul#torch.chain_matmul) ```python torch.chain_matmul(*matrices, out=None) @@ -7,7 +6,6 @@ torch.chain_matmul(*matrices, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.chain_matmul(a, b, c) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.cuda.initial_seed.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.cuda.initial_seed.md index 72257caa06e..44f22e1530b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.cuda.initial_seed.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.cuda.initial_seed.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.cuda.initial_seed - +## [ 组合替代实现 ]torch.cuda.initial_seed ### [torch.cuda.initial_seed](https://pytorch.org/docs/stable/generated/torch.cuda.initial_seed.html?highlight=torch+cuda+initial_seed#torch.cuda.initial_seed) - ```python torch.cuda.initial_seed() ``` @@ -9,7 +7,6 @@ torch.cuda.initial_seed() Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.cuda.initial_seed() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.cuda.set_per_process_memory_fraction.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.cuda.set_per_process_memory_fraction.md index 901523350b9..4a340e1428d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.cuda.set_per_process_memory_fraction.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.cuda.set_per_process_memory_fraction.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.cuda.set_per_process_memory_fraction - ### [torch.cuda.set_per_process_memory_fraction](https://pytorch.org/docs/stable/generated/torch.cuda.set_per_process_memory_fraction.html) - ```python torch.cuda.set_per_process_memory_fraction(fraction, device=None) ``` @@ -9,7 +7,6 @@ torch.cuda.set_per_process_memory_fraction(fraction, device=None) 限制当前进程在指定 GPU 上最多能分配的显存比例,Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.cuda.set_per_process_memory_fraction(0.5) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.detach.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.detach.md index bd626be4a05..f8a01bed4bb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.detach.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.detach.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.detach - ### [torch.detach](https://pytorch.org/docs/stable/autograd.html#variable-deprecated) ```python torch.detach(input) @@ -9,8 +8,7 @@ torch.detach(input) PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 torch.detach(input=data) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.distributed.Backend.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.distributed.Backend.md index 050d42e5152..1e80be6032d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.distributed.Backend.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.distributed.Backend.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.distributed.Backend - +## [ 组合替代实现 ]torch.distributed.Backend ### [torch.distributed.Backend](https://pytorch.org/docs/stable/distributed.html#torch.distributed.Backend) - ```python torch.distributed.Backend(name) ``` @@ -9,7 +7,6 @@ torch.distributed.Backend(name) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.distributed.Backend("GLOO") diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.distributions.transforms.PositiveDefiniteTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.distributions.transforms.PositiveDefiniteTransform.md index 81ae4faa845..657f4a31b3e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.distributions.transforms.PositiveDefiniteTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.distributions.transforms.PositiveDefiniteTransform.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.distributions.transforms.PositiveDefiniteTransform - ### [torch.distributions.transforms.PositiveDefiniteTransform](https://pytorch.org/docs/stable/distributions.html#module-torch.distributions.transforms) - ```python torch.distributions.transforms.PositiveDefiniteTransform(cache_size=0) ``` @@ -9,7 +7,6 @@ torch.distributions.transforms.PositiveDefiniteTransform(cache_size=0) PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 ### 转写示例 - ```python # PyTorch 写法 y = PositiveDefiniteTransform()(tensor1) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.float_power.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.float_power.md index cd8193ead20..9aa44ac92a8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.float_power.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.float_power.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.float_power - +## [ 组合替代实现 ]torch.float_power ### [torch.float_power](https://pytorch.org/docs/stable/generated/torch.float_power.html#torch-float-power) - ```python torch.float_power(input, exponent, *, out=None) ``` @@ -9,7 +7,6 @@ torch.float_power(input, exponent, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.float_power(x, y) @@ -19,7 +16,6 @@ paddle.pow(x.cast(paddle.float64), y) ``` #### out:指定输出 - ```python # PyTorch 写法 torch.float_power(x, y, out=out) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.frombuffer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.frombuffer.md index 28ae185bd92..df7193073c1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.frombuffer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.frombuffer.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.frombuffer - ### [torch.frombuffer](https://pytorch.org/docs/stable/generated/torch.frombuffer.html) - ```python torch.frombuffer(buffer, *, dtype, count=-1, offset=0, requires_grad=False) ``` @@ -9,7 +7,6 @@ torch.frombuffer(buffer, *, dtype, count=-1, offset=0, requires_grad=False) 把 Python 缓冲区创建的的对象变成一维 Tensor,Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.frombuffer(a, dtype=torch.int32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.get_num_interop_threads.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.get_num_interop_threads.md index ce9f90dd4e3..99d0a46354c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.get_num_interop_threads.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.get_num_interop_threads.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.get_num_interop_threads - ### [torch.get_num_interop_threads](https://pytorch.org/docs/stable/generated/torch.get_num_interop_threads.html) - ```python torch.get_num_interop_threads() ``` @@ -9,7 +7,6 @@ torch.get_num_interop_threads() 返回 CPU 上用于操作间并行的线程数 (例如,在 JIT 解释器中),Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.get_num_interop_threads() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.get_num_threads.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.get_num_threads.md index abf95f3b3c7..9467fbfcac6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.get_num_threads.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.get_num_threads.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.get_num_threads - ### [torch.get_num_threads](https://pytorch.org/docs/stable/generated/torch.get_num_threads.html) - ```python torch.get_num_threads() ``` @@ -9,7 +7,6 @@ torch.get_num_threads() 返回用于并行化 CPU 操作的线程数,Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.get_num_threads() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.histogram.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.histogram.md index 45294871afb..c935d2a419e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.histogram.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.histogram.md @@ -1,13 +1,10 @@ ## [ 组合替代实现 ]torch.histogram - ### [torch.histogram](https://pytorch.org/docs/stable/generated/torch.histogram.html#torch.histogram) - ```python torch.histogram(input, bins, *, range=None, weight=None, density=False, out=None) ``` ### [paddle.histogram](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/histogram_cn.html) - ```python paddle.histogram(input, bins=100, min=0.0, max=0.0, weight=None, density=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.histogram(input, bins=100, min=0.0, max=0.0, weight=None, density=False, 其中 PyTorch 的 `range` 与 Paddle 用法不一致,需要转写;且返回参数 Tensor 数量不一致,需要通过 paddle.histogram 和 paddle.histogram_bin_edges 组合实现。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------------------------------------------------- | | input | input | 输入 Tensor。 | @@ -26,9 +22,7 @@ paddle.histogram(input, bins=100, min=0.0, max=0.0, weight=None, density=False, | 返回值 | 返回值 | PyTorch 返回 hist 和 bin_edges,返回值 dtype 类型与 input 或 out 一致,paddle.histogram 返回 hist,返回值 dtype 类型为 int64 或 float32,paddle.histogram_bin_edges 返回 bin_edges,返回值 dtype 类型为 float32,需要转写。 | ### 转写示例 - #### range 参数:bins 的范围 - ```python # PyTorch 写法: x = torch.tensor([1., 2, 1]) @@ -40,7 +34,6 @@ hist = paddle.histogram(x, bins=5, min=0., max=3.) ``` #### 返回值:数量 - ```python # PyTorch 写法: x = torch.tensor([1., 2, 1]) @@ -52,7 +45,6 @@ hist, bin_edges = paddle.histogram(x, bins=5), paddle.histogram_bin_edges(x, bin ``` #### 返回值:dtype 类型 - ```python # PyTorch 写法: x = torch.tensor([1., 2, 1]) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.index_copy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.index_copy.md index 8d69dc352a6..50e4bcfc8dc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.index_copy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.index_copy.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.index_copy - ### [torch.index_copy](https://pytorch.org/docs/stable/generated/torch.index_copy.html#torch.index_copy) - ```python torch.index_copy(input, dim, index, source, *, out=None) ``` @@ -9,7 +7,6 @@ torch.index_copy(input, dim, index, source, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法,dim=0 y = torch.index_copy(input, 0, index, source) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.inference_mode.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.inference_mode.md index 73f7ef0bcfb..4aab12a3a42 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.inference_mode.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.inference_mode.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.inference_mode - ### [torch.inference_mode](https://pytorch.org/docs/stable/generated/torch.inference_mode.html#torch.inference_mode) - ```python torch.inference_mode(mode=True) ``` @@ -9,7 +7,6 @@ torch.inference_mode(mode=True) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 @torch.inference_mode(False) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.initial_seed.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.initial_seed.md index 325259b0869..d7cc9253237 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.initial_seed.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.initial_seed.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.initial_seed - ### [torch.initial_seed](https://pytorch.org/docs/stable/generated/torch.initial_seed.html?highlight=initial_seed) ```python torch.initial_seed() @@ -9,7 +8,7 @@ torch.initial_seed() PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 +### 转写示例 ```python # PyTorch 写法 torch.initial_seed() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.is_nonzero.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.is_nonzero.md index b0a7fc00f5a..0e99e13d407 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.is_nonzero.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.is_nonzero.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.is_nonzero - ### [torch.is_nonzero](https://pytorch.org/docs/stable/generated/torch.is_nonzero.html#torch.is_nonzero) - ```python torch.is_nonzero(input) ``` @@ -9,7 +7,6 @@ torch.is_nonzero(input) 用于判断单个元素是否为 `0` 或者 `False` ,当 `input` 的元素个数不为 1 时,抛出 `RuntimeError`; Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.is_nonzero(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.is_pinned.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.is_pinned.md index 806517e7a16..0895f688ce3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.is_pinned.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.is_pinned.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.Tensor.is_pinned - ### [torch.Tensor.is_pinned](https://pytorch.org/docs/stable/generated/torch.Tensor.is_pinned.html?highlight=is_pinned#torch.Tensor.is_pinned) - ```python torch.Tensor.is_pinned() ``` @@ -9,7 +7,6 @@ torch.Tensor.is_pinned() 返回张量是否在固定内存上; Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = a.is_pinned(b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.linalg.lu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.linalg.lu.md index f2ca24122fe..78303fdefe8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.linalg.lu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.linalg.lu.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.linalg.lu - ### [torch.linalg.lu](https://pytorch.org/docs/stable/generated/torch.linalg.lu.html?highlight=torch+linalg+lu#torch.linalg.lu) - ```python torch.linalg.lu(A, *, pivot=True, out=None) ``` @@ -10,7 +8,6 @@ Paddle 无此 API,需要组合实现。 PyTorch 中 torch.linalg.lu 返回值为 (P, L, U),Paddle 中 paddle.linalg.lu 返回值为(LU, P),需要转写。 ### 转写示例 - ```python # PyTorch 写法 P, L, U = torch.linalg.lu(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.logaddexp2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.logaddexp2.md index e02126936d3..11b38f5bd1d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.logaddexp2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.logaddexp2.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.logaddexp2 - ### [torch.logaddexp2](https://pytorch.org/docs/stable/generated/torch.logaddexp2.html#torch.logaddexp2) - ```python torch.logaddexp2(input, other, *, out=None) ``` @@ -9,7 +7,6 @@ torch.logaddexp2(input, other, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.logaddexp2(a, b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.logdet.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.logdet.md index 3cddb435338..440a3c2cb24 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.logdet.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.logdet.md @@ -1,14 +1,11 @@ ## [ 组合替代实现 ]torch.logdet - ### [torch.logdet](https://pytorch.org/docs/stable/generated/torch.logdet.html#torch.logdet) - ```python torch.logdet(input) ``` Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.logdet(input) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.multiprocessing.cpu_count.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.multiprocessing.cpu_count.md index 607f308e2cb..44ad0177590 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.multiprocessing.cpu_count.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.multiprocessing.cpu_count.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.multiprocessing.cpu_count - ### [torch.multiprocessing.cpu_count](https://github.com/pytorch/pytorch/blob/main/torch/multiprocessing/__init__.py) ```python torch.multiprocessing.cpu_count() @@ -9,8 +8,7 @@ torch.multiprocessing.cpu_count() PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 - +### 转写示例 ```python # PyTorch 写法 torch.multiprocessing.cpu_count() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.narrow_copy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.narrow_copy.md index 3a63ef74e76..714764ad547 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.narrow_copy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.narrow_copy.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.narrow_copy - ### [torch.narrow_copy](https://pytorch.org/docs/stable/generated/torch.narrow_copy.html#torch.narrow_copy) ```python torch.narrow_copy(input, dim, start, length, *, out=None) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_buffer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_buffer.md index 2e2a2103f7a..2d513bd48c1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_buffer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_buffer.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.nn.Module.get_buffer - +## [ 组合替代实现 ]torch.nn.Module.get_buffer ### [torch.nn.Module.get_buffer](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.get_buffer) - ```python torch.nn.Module.get_buffer(target) ``` @@ -9,7 +7,6 @@ torch.nn.Module.get_buffer(target) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 module.get_buffer("target") diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_parameter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_parameter.md index 78c8f528a2e..93c960361de 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_parameter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_parameter.md @@ -1,4 +1,4 @@ -## [组合替代实现]torch.nn.Module.get_parameter +## [ 组合替代实现 ]torch.nn.Module.get_parameter ### [torch.nn.Module.get_parameter](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.get_parameter) @@ -9,7 +9,6 @@ torch.nn.Module.get_parameter(target) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 module.get_parameter("target") diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_submodule.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_submodule.md index c36a6a183b0..10fb51bdca8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_submodule.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Module.get_submodule.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.nn.Module.get_submodule - +## [ 组合替代实现 ]torch.nn.Module.get_submodule ### [torch.nn.Module.get_submodule](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.get_submodule) - ```python torch.nn.Module.get_submodule(target) ``` @@ -9,7 +7,6 @@ torch.nn.Module.get_submodule(target) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 module.get_submodule("target") diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Softmin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Softmin.md index a1a5f48c48d..c63819aecbf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Softmin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.Softmin.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.nn.Softmin - ### [torch.nn.Softmin](https://pytorch.org/docs/stable/generated/torch.nn.Softmin.html#softmin) - ```python torch.nn.Softmin(dim=None) ``` @@ -9,7 +7,6 @@ torch.nn.Softmin(dim=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 module = torch.nn.Softmin(dim=1) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional._Reduction.get_enum.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional._Reduction.get_enum.md index c208f1d7ff9..da06ef7e9b6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional._Reduction.get_enum.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional._Reduction.get_enum.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.nn.functional._Reduction.get_enum - +## [ 组合替代实现 ]torch.nn.functional._Reduction.get_enum ### [torch.nn.functional._Reduction.get_enum](https://github.com/pytorch/pytorch/blob/3045b16488f14c9d941d33d63417e6ea52fb2544/torch/nn/_reduction.py#L7) - ```python torch.nn.functional._Reduction.get_enum(reduction) ``` @@ -9,7 +7,6 @@ torch.nn.functional._Reduction.get_enum(reduction) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.nn.functional._Reduction.get_enum(reduction) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional.softmin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional.softmin.md index 76e307b7b1a..905a9bf86e2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional.softmin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional.softmin.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.nn.functional.softmin - ### [torch.nn.functional.softmin](https://pytorch.org/docs/stable/generated/torch.nn.functional.softmin.html#torch.nn.functional.softmin) - ```python torch.nn.functional.softmin(input, dim=None, _stacklevel=3, dtype=None) ``` @@ -9,7 +7,6 @@ torch.nn.functional.softmin(input, dim=None, _stacklevel=3, dtype=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.nn.functional.softmin(input, dim=1) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.module.register_module_forward_hook.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.module.register_module_forward_hook.md index 4544be7b9dd..cc3b14da4a4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.module.register_module_forward_hook.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.module.register_module_forward_hook.md @@ -1,26 +1,22 @@ ## [ 组合替代实现 ]torch.nn.modules.module.register_module_forward_hook ### [torch.nn.modules.module.register_module_forward_hook](https://pytorch.org/docs/stable/generated/torch.nn.modules.module.register_module_forward_hook.html) - ```python torch.nn.modules.module.register_module_forward_hook(hook, *, always_call=False) ``` ### [paddle.nn.Layer.register_forward_post_hook](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#register-forward-post-hook-hook) - ```python paddle.nn.Layer.register_forward_post_hook(hook) ``` 其中,PyTorch 为给全局所有 module 注册 hook,而 Paddle 为给单个 Layer 注册 hook。PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | hook | hook | 被注册为 forward post-hook 的函数。 | | always_call | - | 是否强制调用钩子,Paddle 无此参数,一般对训练结果影响不大,可直接删除。 | ### 转写示例 - ```python # PyTorch 写法 Linear = torch.nn.Linear(2, 4) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.module.register_module_forward_pre_hook.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.module.register_module_forward_pre_hook.md index ebff2a16c1c..35a1c39ca51 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.module.register_module_forward_pre_hook.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.module.register_module_forward_pre_hook.md @@ -1,13 +1,10 @@ ## [ 组合替代实现 ]torch.nn.modules.module.register_module_forward_pre_hook - ### [torch.nn.modules.module.register_module_forward_pre_hook](https://pytorch.org/docs/stable/generated/torch.nn.modules.module.register_module_forward_pre_hook.html) - ```python torch.nn.modules.module.register_module_forward_pre_hook(hook) ``` ### [paddle.nn.Layer.register_forward_pre_hook](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#register-forward-pre-hook-hook) - ```python paddle.nn.Layer.register_forward_pre_hook(hook) ``` @@ -15,13 +12,11 @@ paddle.nn.Layer.register_forward_pre_hook(hook) 其中,PyTorch 为给全局所有 module 注册 hook,而 Paddle 为给单个 Layer 注册 hook, 具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |---------|--------------|-----------------------------------------------------------------------------------------------| | hook | hook | 被注册为 forward pre-hook 的函数。 | ### 转写示例 - ```python # PyTorch 写法 Linear = torch.nn.Linear(2, 4) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.utils._ntuple.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.utils._ntuple.md index 112df6f386c..cf98de579ed 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.utils._ntuple.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.utils._ntuple.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.nn.modules.utils._ntuple - ### [torch.nn.modules.utils._ntuple](https://github.com/pytorch/pytorch/blob/1f4d4d3b7836d38d936a21665e6b2ab0b39d7092/torch/nn/modules/utils.py#L8) - ```python torch.nn.modules.utils._ntuple(n, name="parse") ``` @@ -9,7 +7,6 @@ torch.nn.modules.utils._ntuple(n, name="parse") Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.nn.modules.utils._ntuple(2, name="parse") diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.utils._pair.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.utils._pair.md index 439b5b1afcb..ba966f0d6b4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.utils._pair.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.modules.utils._pair.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.nn.modules.utils._pair - ### [torch.nn.modules.utils._pair](https://github.com/pytorch/pytorch/blob/1f4d4d3b7836d38d936a21665e6b2ab0b39d7092/torch/nn/modules/utils.py#L198) - ```python torch.nn.modules.utils._pair(x) ``` @@ -9,7 +7,6 @@ torch.nn.modules.utils._pair(x) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.nn.modules.utils._pair(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ConstantLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ConstantLR.md index 005ed097f24..5471c14e2e1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ConstantLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ConstantLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.ConstantLR - ### [torch.optim.lr_scheduler.ConstantLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.ConstantLR.html) - ```python torch.optim.lr_scheduler.ConstantLR(optimizer, factor=0.3333333333333333, @@ -11,7 +9,6 @@ torch.optim.lr_scheduler.ConstantLR(optimizer, ``` ### [paddle.optimizer.lr.PiecewiseDecay](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/PiecewiseDecay_cn.html) - ```python paddle.optimizer.lr.PiecewiseDecay(boundaries, values, @@ -22,7 +19,6 @@ paddle.optimizer.lr.PiecewiseDecay(boundaries, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | - | torch.optim.Optimizer 类,Paddle 无此参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CosineAnnealingLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CosineAnnealingLR.md index ca13c34fac1..633bb8b3ec9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CosineAnnealingLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CosineAnnealingLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.CosineAnnealingLR - ### [torch.optim.lr_scheduler.CosineAnnealingLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.CosineAnnealingLR.html) - ```python torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max, @@ -11,7 +9,6 @@ torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, ``` ### [paddle.optimizer.lr.CosineAnnealingDecay](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/CosineAnnealingDecay_cn.html) - ```python paddle.optimizer.lr.CosineAnnealingDecay(learning_rate, T_max, @@ -23,7 +20,6 @@ paddle.optimizer.lr.CosineAnnealingDecay(learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CosineAnnealingWarmRestarts.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CosineAnnealingWarmRestarts.md index 3b9af32bebe..c05f1faeeb6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CosineAnnealingWarmRestarts.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CosineAnnealingWarmRestarts.md @@ -1,13 +1,10 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.CosineAnnealingWarmRestarts - ### [torch.optim.lr_scheduler.CosineAnnealingWarmRestarts](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.CosineAnnealingWarmRestarts.html) - ```python torch.optim.lr_scheduler.CosineAnnealingWarmRestarts(optimizer, T_0, T_mult=1, eta_min=0, last_epoch=-1, verbose=False) ``` ### [paddle.optimizer.lr.CosineAnnealingWarmRestarts](https://github.com/PaddlePaddle/Paddle/blob/d6ea911bd1bfda5604807eeb18318e71b395ac58/python/paddle/optimizer/lr.py#L2371) - ```python paddle.optimizer.lr.CosineAnnealingWarmRestarts(learning_rate, T_0, @@ -20,7 +17,6 @@ paddle.optimizer.lr.CosineAnnealingWarmRestarts(learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | @@ -31,7 +27,6 @@ paddle.optimizer.lr.CosineAnnealingWarmRestarts(learning_rate, | verbose | verbose | 如果是 True,则在每一轮更新时在标准输出 stdout 输出一条信息。 | ### 转写示例 - ```python # PyTorch 写法 linear = torch.nn.Linear(10, 10) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CyclicLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CyclicLR.md index b8fdf35685a..6ab201aac62 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CyclicLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.CyclicLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.CyclicLR - ### [torch.optim.lr_scheduler.CyclicLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.CyclicLR.html) - ```python torch.optim.lr_scheduler.CyclicLR(optimizer, base_lr, @@ -20,7 +18,6 @@ torch.optim.lr_scheduler.CyclicLR(optimizer, ``` ### [paddle.optimizer.lr.CyclicLR](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/CyclicLR_cn.html) - ```python paddle.optimizer.lr.CyclicLR(base_learning_rate, max_learning_rate, @@ -37,7 +34,6 @@ paddle.optimizer.lr.CyclicLR(base_learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | - | PyTorch 的是 torch.optim.Optimizer 类,Paddle 无对应参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ExponentialLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ExponentialLR.md index 56ccd1b61a2..68d80bdd33c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ExponentialLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ExponentialLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.ExponentialLR - ### [torch.optim.lr_scheduler.ExponentialLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.ExponentialLR.html) - ```python torch.optim.lr_scheduler.ExponentialLR(optimizer, gamma, @@ -10,7 +8,6 @@ torch.optim.lr_scheduler.ExponentialLR(optimizer, ``` ### [paddle.optimizer.lr.ExponentialDecay](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/ExponentialDecay_cn.html) - ```python paddle.optimizer.lr.ExponentialDecay(learning_rate, gamma, @@ -21,7 +18,6 @@ paddle.optimizer.lr.ExponentialDecay(learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LRScheduler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LRScheduler.md index acd60df95a9..bfda9215097 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LRScheduler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LRScheduler.md @@ -1,14 +1,11 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.LRScheduler - ### [torch.optim.lr_scheduler.LRScheduler](https://docs.pytorch.org/docs/2.7/generated/torch.optim.lr_scheduler.LRScheduler.html#torch.optim.lr_scheduler.LRScheduler) - ```python torch.optim.lr_scheduler.LRScheduler(optimizer, last_epoch=-1) ``` ### [paddle.optimizer.lr.LRScheduler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/LRScheduler_cn.html#lrscheduler) - ```python paddle.optimizer.lr.LRScheduler(learning_rate=0.1, last_epoch=-1, @@ -18,7 +15,6 @@ paddle.optimizer.lr.LRScheduler(learning_rate=0.1, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | @@ -26,7 +22,6 @@ paddle.optimizer.lr.LRScheduler(learning_rate=0.1, | - | verbose | 如果是 True,则在每一轮更新时在标准输出 stdout 输出一条信息。| ### 转写示例 - ```python # PyTorch 写法 linear = torch.nn.Linear(10, 10) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LambdaLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LambdaLR.md index 3a49270088e..ac24b2ceb38 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LambdaLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LambdaLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.LambdaLR - ### [torch.optim.lr_scheduler.LambdaLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.LambdaLR.html) - ```python torch.optim.lr_scheduler.LambdaLR(optimizer, lr_lambda, @@ -10,7 +8,6 @@ torch.optim.lr_scheduler.LambdaLR(optimizer, ``` ### [paddle.optimizer.lr.LambdaDecay](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/LambdaDecay_cn.html) - ```python paddle.optimizer.lr.LambdaDecay(learning_rate, lr_lambda, @@ -21,7 +18,6 @@ paddle.optimizer.lr.LambdaDecay(learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LinearLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LinearLR.md index 18b78003bdb..22c014d90fa 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LinearLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.LinearLR.md @@ -1,13 +1,10 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.LinearLR - ### [torch.optim.lr_scheduler.LinearLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.LinearLR.html) - ```python torch.optim.lr_scheduler.LinearLR(optimizer, start_factor=0.3333333333333333, end_factor=1.0, total_iters=5, last_epoch=-1, verbose=False) ``` ### [paddle.optimizer.lr.LinearLR](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/LinearLR_cn.html#linearlr) - ```python paddle.optimizer.lr.LinearLR(learning_rate, total_steps, start_factor=1. / 3, end_factor=1.0, last_epoch=- 1, verbose=False) ``` @@ -15,7 +12,6 @@ paddle.optimizer.lr.LinearLR(learning_rate, total_steps, start_factor=1. / 3, en 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | @@ -26,7 +22,6 @@ paddle.optimizer.lr.LinearLR(learning_rate, total_steps, start_factor=1. / 3, en | verbose | verbose | 如果是 True,则在每一轮更新时在标准输出 stdout 输出一条信息。 | ### 转写示例 - ```python # PyTorch 写法 linear = torch.nn.Linear(10, 10) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.MultiStepLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.MultiStepLR.md index a64d1ab1074..90631eb4f18 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.MultiStepLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.MultiStepLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.MultiStepLR - ### [torch.optim.lr_scheduler.MultiStepLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.MultiStepLR.html) - ```python torch.optim.lr_scheduler.MultiStepLR(optimizer, milestones, @@ -11,7 +9,6 @@ torch.optim.lr_scheduler.MultiStepLR(optimizer, ``` ### [paddle.optimizer.lr.MultiStepDecay](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/MultiStepDecay_cn.html) - ```python paddle.optimizer.lr.MultiStepDecay(learning_rate, milestones, @@ -23,7 +20,6 @@ paddle.optimizer.lr.MultiStepDecay(learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.MultiplicativeLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.MultiplicativeLR.md index 67be341fa93..597d02d864c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.MultiplicativeLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.MultiplicativeLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.MultiplicativeLR - ### [torch.optim.lr_scheduler.MultiplicativeLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.MultiplicativeLR.html) - ```python torch.optim.lr_scheduler.MultiplicativeLR(optimizer, lr_lambda, @@ -10,7 +8,6 @@ torch.optim.lr_scheduler.MultiplicativeLR(optimizer, ``` ### [paddle.optimizer.lr.MultiplicativeDecay](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/MultiplicativeDecay_cn.html) - ```python paddle.optimizer.lr.MultiplicativeDecay(learning_rate, lr_lambda, @@ -21,7 +18,6 @@ paddle.optimizer.lr.MultiplicativeDecay(learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.OneCycleLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.OneCycleLR.md index df8dd484b08..920ce1eecfd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.OneCycleLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.OneCycleLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.OneCycleLR - ### [torch.optim.lr_scheduler.OneCycleLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.OneCycleLR.html) - ```python torch.optim.lr_scheduler.OneCycleLR(optimizer, max_lr, @@ -21,7 +19,6 @@ torch.optim.lr_scheduler.OneCycleLR(optimizer, ``` ### [paddle.optimizer.lr.OneCycleLR](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/OneCycleLR_cn.html) - ```python paddle.optimizer.lr.OneCycleLR(max_learning_rate, total_steps, @@ -37,7 +34,6 @@ paddle.optimizer.lr.OneCycleLR(max_learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | - | PyTorch 的是 torch.optim.Optimizer 类,Paddle 无对应参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ReduceLROnPlateau.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ReduceLROnPlateau.md index d6e639bea88..e3a979d9759 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ReduceLROnPlateau.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.ReduceLROnPlateau.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.ReduceLROnPlateau - ### [torch.optim.lr_scheduler.ReduceLROnPlateau](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.ReduceLROnPlateau.html) - ```python torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, mode='min', @@ -16,7 +14,6 @@ torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, ``` ### [paddle.optimizer.lr.ReduceOnPlateau](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/ReduceOnPlateau_cn.html) - ```python paddle.optimizer.lr.ReduceOnPlateau(learning_rate, mode='min', @@ -33,7 +30,6 @@ paddle.optimizer.lr.ReduceOnPlateau(learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.StepLR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.StepLR.md index 14c1537af22..e01d80f6da1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.StepLR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.optim.lr_scheduler.StepLR.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.optim.lr_scheduler.StepLR - ### [torch.optim.lr_scheduler.StepLR](https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.StepLR.html) - ```python torch.optim.lr_scheduler.StepLR(optimizer, step_size, @@ -11,7 +9,6 @@ torch.optim.lr_scheduler.StepLR(optimizer, ``` ### [paddle.optimizer.lr.StepDecay](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/lr/StepDecay_cn.html) - ```python paddle.optimizer.lr.StepDecay(learning_rate, step_size, @@ -23,7 +20,6 @@ paddle.optimizer.lr.StepDecay(learning_rate, 两者 API 功能一致, 参数用法不一致,PyTorch 是 Scheduler 实例持有 Optimizer 实例,Paddle 是 Optimizer 实例持有 Scheduler 实例。由于持有关系相反,因此 Paddle 使用 Optimizer.set_lr_scheduler 来设置这种持有关系。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------ | | optimizer | learning_rate | PyTorch 的 optimizer 类型是 torch.optim.Optimizer,Paddle 的 learning_rate 类型是 float,两者功能上不直接一致,但可通过设置 leaning_rate = optimizer.get_lr() 来对应一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.seed.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.seed.md index 4ea864f3a79..0c55b3a307d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.seed.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.seed.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.seed - ### [torch.seed](https://pytorch.org/docs/stable/generated/torch.seed.html#torch.seed) ```python torch.seed() @@ -9,7 +8,7 @@ torch.seed() PaddlePaddle 目前无对应 API,可使用如下代码组合实现该 API。 -### 转写示例 +### 转写示例 ```python # PyTorch 写法 torch.seed() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.select.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.select.md index f01ec665f40..9ab2d47badb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.select.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.select.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.select - ### [torch.select](https://pytorch.org/docs/stable/generated/torch.select.html#torch.select) - ```python torch.select(input, dim, index) ``` @@ -9,7 +7,6 @@ torch.select(input, dim, index) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.select(a, dim=dim, index=index) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.set_num_interop_threads.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.set_num_interop_threads.md index 89d9062d239..68dc746b956 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.set_num_interop_threads.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.set_num_interop_threads.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.set_num_interop_threads - ### [torch.set_num_interop_threads](https://pytorch.org/docs/stable/generated/torch.set_num_interop_threads.html) - ```python torch.set_num_interop_threads() ``` @@ -9,7 +7,6 @@ torch.set_num_interop_threads() 设置 CPU 上用于操作间并行的线程数 (例如,在 JIT 解释器中),Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.set_num_interop_threads(2) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.set_num_threads.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.set_num_threads.md index f3f51e5dc6b..d17d52b9079 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.set_num_threads.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.set_num_threads.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.set_num_threads - ### [torch.set_num_threads](https://pytorch.org/docs/stable/generated/torch.set_num_threads.html) - ```python torch.set_num_threads(int) ``` @@ -9,7 +7,6 @@ torch.set_num_threads(int) 设置用于 CPU 上的内部操作并行性的线程数,Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.set_num_threads(2) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.erfc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.erfc.md index 9d3e2772255..8ca40c19614 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.erfc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.erfc.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.special.erfc - +## [ 组合替代实现 ]torch.special.erfc ### [torch.special.erfc](https://pytorch.org/docs/stable/special.html#torch.special.erfc) - ```python torch.special.erfc(input, *, out=None) ``` @@ -9,7 +7,6 @@ torch.special.erfc(input, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.special.erfc(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.erfcx.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.erfcx.md index 501297330f0..896c604625f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.erfcx.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.erfcx.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.special.erfcx - ### [torch.special.erfcx](https://pytorch.org/docs/stable/special.html#torch.special.erfcx) - ```python torch.special.erfcx(input, *, out=None) ``` @@ -9,7 +7,6 @@ torch.special.erfcx(input, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.special.erfcx(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.exp2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.exp2.md index 8c24106a81c..0463fdc4f1a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.exp2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.exp2.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.special.exp2 - +## [ 组合替代实现 ]torch.special.exp2 ### [torch.special.exp2](https://pytorch.org/docs/stable/special.html#torch.special.exp2) - ```python torch.special.exp2(input, *, out=None) ``` @@ -9,7 +7,6 @@ torch.special.exp2(input, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.special.exp2(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.expit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.expit.md index 2264c97e846..15e1cabf085 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.expit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.expit.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.special.expit - +## [ 组合替代实现 ]torch.special.expit ### [torch.special.expit](https://pytorch.org/docs/stable/special.html#torch.special.expit) - ```python torch.special.expit(input, *, out=None) ``` @@ -9,7 +7,6 @@ torch.special.expit(input, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.special.expit(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.ndtr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.ndtr.md index 9c250a52154..2c48afca91f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.ndtr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.ndtr.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.special.ndtr - ### [torch.special.ndtr](https://pytorch.org/docs/stable/special.html#torch.special.ndtr) - ```python torch.special.ndtr(input, *, out=None) ``` @@ -14,7 +12,6 @@ $$ $$ ### 转写示例 - ```python # PyTorch 写法 torch.special.ndtr(a) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.ndtri.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.ndtri.md index 2a6c8c7c66f..ef28ba5e579 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.ndtri.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.ndtri.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.special.ndtri - ### [torch.special.ndtri](https://pytorch.org/docs/stable/special.html#torch.special.ndtri) - ```python torch.special.ndtri(input, *, out=None) ``` @@ -9,7 +7,6 @@ torch.special.ndtri(input, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.special.ndtri(a) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.xlog1py.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.xlog1py.md index 975eb13c9a2..74a17d264fd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.xlog1py.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.xlog1py.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.special.xlog1py - ### [torch.special.xlog1py](https://pytorch.org/docs/stable/special.html#torch.special.xlog1py) - ```python torch.special.xlog1py(input, other, *, out=None) ``` @@ -9,7 +7,6 @@ torch.special.xlog1py(input, other, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.special.xlog1py(a, b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.xlogy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.xlogy.md index 1473d9ec4b6..3d5f1aa19f3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.xlogy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.special.xlogy.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.special.xlogy - ### [torch.special.xlogy](https://pytorch.org/docs/stable/special.html#torch.special.xlogy) - ```python torch.special.xlogy(input, other, *, out=None) ``` @@ -9,7 +7,6 @@ torch.special.xlogy(input, other, *, out=None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 y = torch.special.xlogy(a, b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.std_mean.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.std_mean.md index 16f62ca4a0f..8754ef4059c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.std_mean.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.std_mean.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.std_mean - ### [torch.std_mean](https://pytorch.org/docs/stable/generated/torch.std_mean.html?highlight=std_mean#torch.std_mean) ```python # 用法一: @@ -8,8 +7,7 @@ torch.std_mean(input, unbiased=True) torch.std_mean(input, dim, unbiased=True, keepdim=False) ``` -### 功能介绍 -用于实现返回 Tensor 的标准差和均值,PaddlePaddle 目前暂无对应 API,可使用如下代码组合实现该 API。 +### 功能介绍用于实现返回 Tensor 的标准差和均值,PaddlePaddle 目前暂无对应 API,可使用如下代码组合实现该 API。 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.assert_allclose.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.assert_allclose.md index 60bb3acd66f..04acf4c9807 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.assert_allclose.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.assert_allclose.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.testing.assert_allclose - ### [torch.testing.assert_allclose](https://pytorch.org/docs/stable/testing.html?highlight=torch+testing+assert_allclose#torch.testing.assert_allclose) - ```python torch.testing.assert_allclose(actual, expected, rtol=None, atol=None, equal_nan=True, msg='') ``` @@ -9,7 +7,6 @@ torch.testing.assert_allclose(actual, expected, rtol=None, atol=None, equal_nan= Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.testing.assert_allclose(actual, expected, rtol=rtol, atol=atol, equal_nan=True, msg='error messege') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.assert_close.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.assert_close.md index 2bda0c77c58..b1dbc17388f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.assert_close.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.assert_close.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.testing.assert_close - ### [torch.testing.assert_close](https://pytorch.org/docs/stable/testing.html?highlight=assert_close#torch.testing.assert_close) - ```python torch.testing.assert_close(actual, expected, *, allow_subclasses=True, rtol=None, atol=None, equal_nan=False, check_device=True, check_dtype=True, check_layout=True, check_stride=False, msg=None) ``` @@ -9,7 +7,6 @@ torch.testing.assert_close(actual, expected, *, allow_subclasses=True, rtol=None Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.testing.assert_close(actual, expected, rtol=rtol, atol=atol, equal_nan=True, msg='error messege') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.make_tensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.make_tensor.md index e3da2f9808a..b6e00ec2f29 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.make_tensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.testing.make_tensor.md @@ -1,7 +1,5 @@ ## [ 组合替代实现 ]torch.testing.make_tensor - ### [torch.testing.make_tensor](https://pytorch.org/docs/stable/testing.html#torch.testing.make_tensor) - ```python torch.testing.make_tensor(*shape, dtype, device, low=None, high=None, requires_grad=False, noncontiguous=False, exclude_zero=False, memory_format=None) ``` @@ -9,7 +7,6 @@ torch.testing.make_tensor(*shape, dtype, device, low=None, high=None, requires_g Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 x = torch.testing.make_tensor(shape, dtype, device, low=low, high=high, requires_grad=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.utils.set_module.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.utils.set_module.md index 27b123715b0..fdc8f3ce9b0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.utils.set_module.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.utils.set_module.md @@ -1,7 +1,5 @@ -## [组合替代实现]torch.utils.set_module - +## [ 组合替代实现 ]torch.utils.set_module ### [torch.utils.set_module](https://docs.pytorch.org/docs/stable/generated/torch.utils.set_module.html#torch-utils-set-module) - ```python torch.utils.set_module(obj, mod) ``` @@ -9,7 +7,6 @@ torch.utils.set_module(obj, mod) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # PyTorch 写法 torch.utils.set_module(obj, mod) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.var_mean.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.var_mean.md index 80adbd7f222..f23595e41b7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.var_mean.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.var_mean.md @@ -1,5 +1,4 @@ ## [ 组合替代实现 ]torch.var_mean - ### [torch.var_mean](https://pytorch.org/docs/stable/generated/torch.var_mean.html?highlight=var_mean#torch.var_mean) ```python # 用法一: @@ -12,8 +11,7 @@ torch.var_mean(input, unbiased=True) ``` -### 功能介绍 -用于实现返回 Tensor 的方差和均值,PaddlePaddle 目前暂无对应 API,可使用如下代码组合实现该 API。 +### 功能介绍用于实现返回 Tensor 的方差和均值,PaddlePaddle 目前暂无对应 API,可使用如下代码组合实现该 API。 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.get_head_mask.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.get_head_mask.md index ce7cf85534b..b81d28d2cfc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.get_head_mask.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.get_head_mask.md @@ -1,7 +1,5 @@ -## [组合替代实现]transformers.PreTrainedModel.get_head_mask - +## [ 组合替代实现 ]transformers.PreTrainedModel.get_head_mask ### [transformers.PreTrainedModel.get_head_mask](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/model#transformers.modeling_utils.ModuleUtilsMixin.get_head_mask) - ```python transformers.PreTrainedModel.get_head_mask(head_mask: Optional, num_hidden_layers: int, is_attention_chunked: bool = False) ``` @@ -9,7 +7,6 @@ transformers.PreTrainedModel.get_head_mask(head_mask: Optional, num_hidden_layer Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # Pytorch 写法 head_mask_output = transformers.PreTrainedModel.get_head_mask(head_mask = x, num_hidden_layers, is_attention_chunked) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.md index b126511b791..69e7da52ae0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.md @@ -1,13 +1,10 @@ -## [组合替代实现]transformers.PreTrainedModel - +## [ 组合替代实现 ]transformers.PreTrainedModel ### [transformers.PreTrainedModel](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/model#transformers.PreTrainedModel) - ```python transformers.PreTrainedModel(config: PretrainedConfig, *inputs, **kwargs) ``` ### [paddlenlp.transformers.PreTrainedModel](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/transformers/model_utils.py#L843) - ```python paddlenlp.transformers.PreTrainedModel(*args, **kwargs) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.post_init.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.post_init.md index 269fd206435..1ebeb671737 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.post_init.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.PreTrainedModel.post_init.md @@ -1,7 +1,5 @@ -## [组合替代实现]transformers.PreTrainedModel.post_init - +## [ 组合替代实现 ]transformers.PreTrainedModel.post_init ### [transformers.PreTrainedModel.post_init](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/model#transformers.PreTrainedModel.post_init) - ```python transformers.PreTrainedModel.post_init() ``` @@ -9,7 +7,6 @@ transformers.PreTrainedModel.post_init() Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # Pytorch 写法 model.post_init() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.logging.get_logger.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.logging.get_logger.md index 8fab7969d61..9d9fc85bf22 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.logging.get_logger.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/transformers.logging.get_logger.md @@ -1,7 +1,5 @@ -## [组合替代实现]transformers.logging.get_logger - +## [ 组合替代实现 ]transformers.logging.get_logger ### [transformers.logging.get_logger](https://github.com/huggingface/transformers/blob/d625294d79341662784495551abdf45e6cb9372f/src/transformers/utils/logging.py#L147) - ```python transformers.logging.get_logger(name: Optional[str] = None) ``` @@ -9,7 +7,6 @@ transformers.logging.get_logger(name: Optional[str] = None) Paddle 无此 API,需要组合实现。 ### 转写示例 - ```python # Pytorch 写法 transformers.logging.get_logger() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.copysign.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.copysign.md index 4e8e53255a7..c1b6b593d0b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.copysign.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.copysign.md @@ -1,13 +1,10 @@ -## [ 输入参数类型不一致 ] torch.Tensor.copysign - +## [ 输入参数类型不一致 ]torch.Tensor.copysign ### [torch.Tensor.copysign](https://pytorch.org/docs/stable/generated/torch.Tensor.copysign.html#torch.Tensor.copysign) - ```python torch.Tensor.copysign(other) ``` ### [paddle.Tensor.copysign]() - ```python paddle.Tensor.copysign(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.copysign(y, name=None) 其中,PyTorch 与 Paddle 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | other | y | 表示输入的 Tensor ,PyTorch 支持 Python Number 和 Tensor 类型, Paddle 仅支持 Tensor 类型。当输入为 Python Number 类型时,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.copysign_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.copysign_.md index 4c664fb5918..3ea405920a9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.copysign_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.copysign_.md @@ -1,13 +1,10 @@ -## [ 输入参数类型不一致 ] torch.Tensor.copysign_ - +## [ 输入参数类型不一致 ]torch.Tensor.copysign_ ### [torch.Tensor.copysign_](https://pytorch.org/docs/stable/generated/torch.Tensor.copysign_.html#torch.Tensor.copysign_) - ```python torch.Tensor.copysign_(other) ``` ### [paddle.Tensor.copysign_]() - ```python paddle.Tensor.copysign_(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.copysign_(y, name=None) 其中,PyTorch 与 Paddle 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | other | y | 表示输入的 Tensor ,PyTorch 支持 Python Number 和 Tensor 类型, Paddle 仅支持 Tensor 类型。当输入为 Python Number 类型时,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.cuda.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.cuda.md index febf381d9b9..529a8b48020 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.cuda.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.cuda.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torch.Tensor.cuda - +## [ 输入参数类型不一致 ]torch.Tensor.cuda ### [torch.Tensor.cuda](https://pytorch.org/docs/stable/generated/torch.Tensor.cuda.html#torch.Tensor.cuda) - ```python torch.Tensor.cuda(device=None, non_blocking=False, memory_format=torch.preserve_format) ``` ### [paddle.Tensor.cuda](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#cuda-device-id-none-blocking-false) - ```python paddle.Tensor.cuda(device_id=None, blocking=False) ``` @@ -15,7 +12,6 @@ paddle.Tensor.cuda(device_id=None, blocking=False) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------------------ | | device | device_id | 目标 GPU 设备,输入参数类型不一致,需要转写。 | @@ -24,9 +20,7 @@ paddle.Tensor.cuda(device_id=None, blocking=False) ### 转写示例 - #### non_blocking: 同步或异步拷贝 - ```python # PyTorch 写法 tensor.cuda(non_blocking=True) @@ -36,7 +30,6 @@ tensor.cuda(blocking=False) ``` #### device: 目标 GPU 设备 - ```python # PyTorch 写法 tensor.cuda("cuda:0") diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.eq_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.eq_.md index e39735b417b..cf184c9f8a7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.eq_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.eq_.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.Tensor.eq_ - ### [torch.Tensor.eq_](https://pytorch.org/docs/stable/generated/torch.Tensor.eq_.html) - ```python torch.Tensor.eq_(other) ``` ### [paddle.Tensor.equal_]() - ```python paddle.Tensor.equal_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.equal_(y) 其中,PyTorch 与 Paddle 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|------------------------------| ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,PyTorch 支持 Python Number 和 Tensor 类型, Paddle 仅支持 Tensor 类型。当输入为 Python Number 类型时,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.floor_divide.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.floor_divide.md index ba8ff51b7c5..11e379ed6cb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.floor_divide.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.floor_divide.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.Tensor.floor_divide - ### [torch.Tensor.floor_divide](https://pytorch.org/docs/stable/generated/torch.Tensor.floor_divide.html?highlight=floor_divide#torch.Tensor.floor_divide) - ```python torch.Tensor.floor_divide(other) ``` ### [paddle.Tensor.floor_divide](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#floor-divide-y-name-none) - ```python paddle.Tensor.floor_divide(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.floor_divide(y, name=None) 其中,PyTorch 与 Paddle 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------- | | other | y | 多维 Tensor,PyTorch 支持 Tensor 和 Python Number,Paddle 仅支持 Tensor,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.floor_divide_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.floor_divide_.md index 594b9afff6d..9f0144ce829 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.floor_divide_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.floor_divide_.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.Tensor.floor_divide_ - ### [torch.Tensor.floor_divide_](https://pytorch.org/docs/stable/generated/torch.Tensor.floor_divide_.html) - ```python torch.Tensor.floor_divide_(other) ``` ### [paddle.Tensor.floor_divide_]() - ```python paddle.Tensor.floor_divide_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.floor_divide_(y) 其中,PyTorch 与 Paddle 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------- | | other | y | 多维 Tensor,PyTorch 支持 Tensor 和 Python Number,Paddle 仅支持 Tensor,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.fmod.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.fmod.md index e2e976205ca..0ac22c00744 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.fmod.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.fmod.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.Tensor.fmod - ### [torch.Tensor.fmod](https://pytorch.org/docs/stable/generated/torch.Tensor.fmod.html#torch.Tensor.fmod) - ```python torch.Tensor.fmod(other) ``` ### [paddle.Tensor.mod](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#mod-y-name-none) - ```python paddle.Tensor.mod(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.mod(y, name=None) 其中,PyTorch 与 Paddle 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | other | y | 多维 Tensor,PyTorch 支持 Tensor 和 Python Number,Paddle 仅支持 Tensor,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.fmod_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.fmod_.md index 9662f89b922..0ae1e8c41fe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.fmod_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.fmod_.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.Tensor.fmod_ - ### [torch.Tensor.fmod_](https://pytorch.org/docs/stable/generated/torch.Tensor.fmod_.html#torch.Tensor.fmod_) - ```python torch.Tensor.fmod_(other) ``` ### [paddle.Tensor.mod_]() - ```python paddle.Tensor.mod_(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.mod_(y, name=None) 其中,PyTorch 与 Paddle 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | other | y | 多维 Tensor,PyTorch 支持 Tensor 和 Python Number,Paddle 仅支持 Tensor,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.ge_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.ge_.md index f1978890f34..a2ad9d73324 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.ge_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.ge_.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.Tensor.ge_ - ### [torch.Tensor.ge_](https://pytorch.org/docs/stable/ge_nerated/torch.Tensor.ge_.html) - ```python torch.Tensor.ge_(other) ``` ### [paddle.Tensor.greater_equal_]() - ```python paddle.Tensor.greater_equal_(y) ``` @@ -15,7 +12,6 @@ paddle.Tensor.greater_equal_(y) 其中,PyTorch 与 Paddle 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|------------------------------| ------------------------------------------------------ | | other | y | 输入的 Tensor ,PyTorch 支持 Tensor 和 Python Number,Paddle 仅支持 Tensor,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.gt_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.gt_.md index 0059c977dab..5576e496e41 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.gt_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.gt_.md @@ -1,20 +1,16 @@ ## [ 输入参数类型不一致 ]torch.Tensor.gt_ - ### [torch.Tensor.gt_](https://pytorch.org/docs/stable/generated/torch.Tensor.gt_.html) - ```python torch.Tensor.gt_(other) ``` ### [paddle.Tensor.greater_than_]() - ```python paddle.Tensor.greater_than_(y) ``` 其中 Paddle 和 PyTorch 的 `other` 参数所支持的数据类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|------------------------------| ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,PyTorch 支持 Python Number 和 Tensor 类型, Paddle 仅支持 Tensor 类型。当输入为 Python Number 类型时,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.le_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.le_.md index 3a27a1e5c38..b8d558018e2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.le_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.le_.md @@ -1,20 +1,16 @@ ## [ 输入参数类型不一致 ]torch.Tensor.le_ - ### [torch.Tensor.le_](https://pytorch.org/docs/stable/generated/torch.Tensor.le_.html) - ```python torch.Tensor.le_(other) ``` ### [paddle.Tensor.less_equal_]() - ```python paddle.Tensor.less_equal_(y) ``` 其中 Paddle 和 PyTorch 的 `other` 参数所支持的数据类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|------------------------------| ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,PyTorch 支持 Python Number 和 Tensor 类型, Paddle 仅支持 Tensor 类型。当输入为 Python Number 类型时,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.lt_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.lt_.md index 02ea43b54c2..a958db5f094 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.lt_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.lt_.md @@ -1,20 +1,16 @@ ## [ 输入参数类型不一致 ]torch.Tensor.lt_ - ### [torch.Tensor.lt_](https://pytorch.org/docs/stable/generated/torch.Tensor.lt_.html) - ```python torch.Tensor.lt_(other) ``` ### [paddle.Tensor.less_than_]() - ```python paddle.Tensor.less_than_(y) ``` 其中 Paddle 和 PyTorch 的 `other` 参数所支持的数据类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------------------------------|------------------------------| ------------------------------------------------------ | | other | y | 表示输入的 Tensor ,PyTorch 支持 Python Number 和 Tensor 类型, Paddle 仅支持 Tensor 类型。当输入为 Python Number 类型时,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.ne_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.ne_.md index 7b63ba0e910..379e1374b1b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.ne_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.ne_.md @@ -1,12 +1,10 @@ -## [ 输入参数类型不一致 ] torch.Tensor.ne_ +## [ 输入参数类型不一致 ]torch.Tensor.ne_ ### [torch.Tensor.ne_](https://pytorch.org/docs/stable/generated/torch.Tensor.ne_.html) - ```python torch.Tensor.ne_(other) ``` ### [paddle.Tensor.not_equal_]() - ```python paddle.Tensor.not_equal_(y) ``` @@ -14,7 +12,6 @@ paddle.Tensor.not_equal_(y) 其中,Paddle 与 PyTorch 的 `other` 参数所支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------- | | other | y | 比较的元素,PyTorch 支持 Tensor 和 Python Number,Paddle 仅支持 Tensor,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.qr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.qr.md index eda48973fbe..73a1b2b2d77 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.qr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.qr.md @@ -1,13 +1,10 @@ -## [ 输入参数类型不一致 ] torch.Tensor.qr - +## [ 输入参数类型不一致 ]torch.Tensor.qr ### [torch.Tensor.qr](https://pytorch.org/docs/stable/generated/torch.Tensor.qr.html?highlight=torch+tensor+qr#torch.Tensor.qr) - ```python torch.Tensor.qr(some=True) ``` ### [paddle.Tensor.qr](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/linalg/qr_cn.html#qr) - ```python paddle.Tensor.qr(mode='reduced') ``` @@ -15,7 +12,6 @@ paddle.Tensor.qr(mode='reduced') 其中,PyTorch 的 `some` 和 PaddlePaddle 的 `mode` 参数所支持的数据类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |---------|--------------|------------------------------------------------------------------------| | some | mode | 表示 QR 分解的行为。PyTorch 支持布尔类型的输入,PaddlePaddle 支持字符串类型的输入。 两者使用方式不一致,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.remainder_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.remainder_.md index a099548e2fd..d50ce7cc908 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.remainder_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.remainder_.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.Tensor.remainder_ - ### [torch.Tensor.remainder_](https://pytorch.org/docs/stable/generated/torch.Tensor.remainder_.html?highlight=torch+tensor+remainder_#torch.Tensor.remainder_) - ```python torch.Tensor.remainder_(other) ``` ### [paddle.Tensor.remainder_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#id15) - ```python paddle.Tensor.remainder_(y, name=None) ``` @@ -15,15 +12,12 @@ paddle.Tensor.remainder_(y, name=None) 其中 Paddle 与 PyTorch 运算除数参数所支持的类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | other | y | 除数,PyTorch 可为 Tensor or Scalar,Paddle 仅可为 Tensor,需要转写。 | ### 转写示例 - #### other:除数为 Scalar - ```python # PyTorch 写法 x.remainder_(1) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.slice_scatter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.slice_scatter.md index 3a054ee20af..c84aeabd0ae 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.slice_scatter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.Tensor.slice_scatter.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.Tensor.slice_scatter - ### [torch.Tensor.slice_scatter](https://pytorch.org/docs/stable/generated/torch.Tensor.slice_scatter.html#torch-tensor-slice-scatter) - ```python torch.Tensor.slice_scatter(src, dim=0, start=None, end=None, step=1) ``` ### [paddle.Tensor.slice_scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#slice_scatter-value-axes-starts-ends-strides-name-none) - ```python paddle.Tensor.slice_scatter(value, axes, starts, ends, strides, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.slice_scatter(value, axes, starts, ends, strides, name=None) 两者功能一致,参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | src | value | 嵌入的值,仅参数名不一致。 | @@ -25,7 +21,6 @@ paddle.Tensor.slice_scatter(value, axes, starts, ends, strides, name=None) | step | strides | 嵌入步长,PyTorch 为 int 类型,Paddle 为 list of int。 | ### 转写示例 - ```python # PyTorch 写法 x.slice_scatter(src, dim=0, start=1, end=5, step=2) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.block_diag.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.block_diag.md index e9b4c66468f..60bcdbdfff0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.block_diag.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.block_diag.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torch.block_diag - +## [ 输入参数类型不一致 ]torch.block_diag ### [torch.block_diag](https://pytorch.org/docs/stable/generated/torch.block_diag.html#torch-block-diag) - ```python torch.block_diag(*tensors) ``` ### [paddle.block_diag](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/block_diag_cn.html) - ```python paddle.block_diag(inputs, name=None) ``` @@ -15,15 +12,12 @@ paddle.block_diag(inputs, name=None) 二者功能一致但参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | ------------------------------------------------------------ | | *tensors | inputs | 一组输入 Tensor,PyTorch 参数 tensors 为可变参数,Paddle 参数 inputs 为 list(Tensor) 或 tuple(Tensor) 的形式。 | ### 转写示例 - #### *tensors:一组输入 Tensor - ```python # PyTorch 写法 torch.block_diag(x, y, z) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.broadcast_tensors.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.broadcast_tensors.md index 64b13289461..47e0f931459 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.broadcast_tensors.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.broadcast_tensors.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.broadcast_tensors - ### [torch.broadcast_tensors](https://pytorch.org/docs/stable/generated/torch.broadcast_tensors.html?highlight=broadcast_tensors#torch.broadcast_tensors) - ```python torch.broadcast_tensors(*tensors) ``` ### [paddle.broadcast_tensors](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/broadcast_tensors_cn.html#broadcast-tensors) - ```python paddle.broadcast_tensors(input, name=None) @@ -15,7 +12,6 @@ paddle.broadcast_tensors(input, 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | *tensors | input | 一组输入 Tensor , PyTorch 参数 tensors 为可变参, Paddle 参数 inputs 为 list(Tensor) 或 tuple(Tensor) 的形式。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cartesian_prod.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cartesian_prod.md index dbcae71d453..5b58077b25a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cartesian_prod.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cartesian_prod.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torch.cartesian_prod - +## [ 输入参数类型不一致 ]torch.cartesian_prod ### [torch.cartesian_prod](https://pytorch.org/docs/stable/generated/torch.cartesian_prod.html#torch-cartesian-prod) - ```python torch.cartesian_prod(*tensors) ``` ### [paddle.cartesian_prod](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cartesian_prod_cn.html) - ```python paddle.cartesian_prod(x, name=None) ``` @@ -15,15 +12,12 @@ paddle.cartesian_prod(x, name=None) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | ------------------------------------------------------------ | | *tensors | x | 一组输入 Tensor , PyTorch 参数 tensors 为可变参, Paddle 参数 x 为 list(Tensor) 或 tuple(Tensor) 的形式。 | ### 转写示例 - #### *tensors:一组输入 Tensor - ```python # PyTorch 写法 torch.cartesian_prod(a, b) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cpu.set_device.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cpu.set_device.md index 1d8a76ee9a3..94bf4c58591 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cpu.set_device.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cpu.set_device.md @@ -1,20 +1,16 @@ ## [ 输入参数类型不一致 ]torch.cpu.set_device - ### [torch.cpu.set_device](https://pytorch.org/docs/stable/generated/torch.cpu.set_device.html) - ```python torch.cpu.set_device(device) ``` ### [paddle.device.set_device](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/set_device_cn.html#set-device) - ```python paddle.device.set_device(device) ``` 功能一致,参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ |------------------------------------------------| | device | device | PyTorch 支持 torch.device 。PaddlePaddle 支持 str。 | @@ -22,7 +18,6 @@ paddle.device.set_device(device) ### 转写示例 #### device: 特定的运行设备 - ```python # PyTorch 写法 torch.cpu.set_device('cpu:0') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.device.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.device.md index 90fca7b96f0..66e59e56543 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.device.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.device.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.cuda.device - ### [torch.cuda.device](https://pytorch.org/docs/stable/generated/torch.cuda.device.html#torch.cuda.device) - ```python torch.cuda.device(device) ``` ### [paddle.device._convert_to_place](https://github.com/PaddlePaddle/Paddle/blob/c8ccc9b154632ef41ade1b8e97b87d54fde7e8f8/python/paddle/device/__init__.py#L174) - ```python paddle.device._convert_to_place(device) ``` @@ -15,15 +12,12 @@ paddle.device._convert_to_place(device) 其中 PyTorch 与 Paddle 的参数支持类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------------------------------- | | device | device | GPU 的设备 ID, PyTorch 支持 torch.device 和 int,Paddle 支持 str,需要转写。 | ### 转写示例 - #### device: 特定的运行设备 - ```python # PyTorch 写法 torch.cuda.device('cuda:0') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.set_rng_state_all.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.set_rng_state_all.md index 314257f7727..41b1942e5ab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.set_rng_state_all.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.set_rng_state_all.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.cuda.set_rng_state_all - ### [torch.cuda.set_rng_state_all](https://pytorch.org/docs/stable/generated/torch.cuda.set_rng_state_all.html#torch.cuda.set_rng_state_all) - ```python torch.cuda.set_rng_state_all(new_states) ``` ### [paddle.set_rng_state]() - ```python paddle.set_rng_state(state_list, device='gpu') ``` @@ -15,16 +12,13 @@ paddle.set_rng_state(state_list, device='gpu') 其中 PyTorch 与 Paddle 的参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | new_states | state_list | 表示每个设备需要的状态,PyTorch 类型为 torch.ByteTensor 列表,Paddle 类型为 GeneratorState 列表,需要转写。 | | - | device | 返回随机数生成器状态的设备,Paddle 取值 gpu。 | ### 转写示例 - #### 参数类型不同 - ```python # PyTorch 写法 x = torch.cuda.get_rng_state_all() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.synchronize.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.synchronize.md index 26d7c2c45eb..7eac4e02fc8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.synchronize.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.cuda.synchronize.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.cuda.synchronize - ### [torch.cuda.synchronize](https://pytorch.org/docs/stable/generated/torch.cuda.synchronize.html#torch.cuda.synchronize) - ```python torch.cuda.synchronize(device) ``` ### [paddle.device.synchronize](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/synchronize_cn.html) - ```python paddle.device.synchronize(device) ``` @@ -15,14 +12,12 @@ paddle.device.synchronize(device) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ |-----------------------------------------------------------------------| | device | device | PyTorch 支持 torch.device 和 int。 PaddlePaddle 支持 paddle.CUDAPlace、int 、str,需要转写 | ### 转写示例 #### device: 特定的运行设备 - ```python # PyTorch 写法 torch.cuda.synchronize('cuda:0') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.distributed.reduce_scatter_tensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.distributed.reduce_scatter_tensor.md index ddfc77ed288..580866438a2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.distributed.reduce_scatter_tensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.distributed.reduce_scatter_tensor.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.distributed.reduce_scatter_tensor - ### [torch.distributed.reduce_scatter_tensor](https://docs.pytorch.org/docs/stable/distributed.html#torch.distributed.reduce_scatter_tensor) - ```python torch.distributed.reduce_scatter_tensor(output, input, op=, group=None, async_op=False) ``` ### [paddle.distributed.reduce_scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/reduce_scatter_cn.html#reduce-scatter) - ```python paddle.distributed.reduce_scatter(tensor, tensor_list, op=ReduceOp.SUM, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.reduce_scatter(tensor, tensor_list, op=ReduceOp.SUM, group=No 其中 PyTorch 和 Paddle 功能一致,参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | ---------------------------------------------------------------------- | | output | tensor | 用于接收数据的 tensor,仅参数名不一致。 | @@ -25,9 +21,7 @@ paddle.distributed.reduce_scatter(tensor, tensor_list, op=ReduceOp.SUM, group=No | async_op | sync_op | 该操作是否为异步或同步操作,PyTorch 和 Paddle 取值相反,需要转写。 | ### 转写示例 - #### input 参数:输入的张量 - ```python # PyTorch 写法: torch.distributed.reduce_scatter_tensor(output, input) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.linalg.lu_solve.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.linalg.lu_solve.md index 7e9dcb3e688..6beba7c454e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.linalg.lu_solve.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.linalg.lu_solve.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.linalg.lu_solve - ### [torch.linalg.lu_solve](https://pytorch.org/docs/stable/generated/torch.linalg.lu_solve.html#torch.linalg.lu_solve) - ```python torch.linalg.lu_solve(LU, pivots, B, *, left=True, adjoint=False, out=None) ``` ### [paddle.linalg.lu_solve](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/lu_solve_cn.html) - ```python paddle.linalg.lu_solve(b, lu, pivots, trans="N", name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.lu_solve(b, lu, pivots, trans="N", name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------- | | LU | lu | 表示 LU 分解结果矩阵,由 L、U 拼接组成,仅参数名不一致。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor 元组 , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.lu_solve(LU, pivots, B, out=A) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.Module.type.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.Module.type.md index 5920da3abdd..9ebf608085c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.Module.type.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.Module.type.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.nn.Module.type - ### [torch.nn.Module.type](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.type) - ```python torch.nn.Module.type(dst_type) ``` ### [paddle.nn.Layer.astype](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#astype-dtype-none) - ```python paddle.nn.Layer.astype(dtype=None) ``` @@ -15,15 +12,12 @@ paddle.nn.Layer.astype(dtype=None) 两者参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------------------------------------------------- | | dst_type | dtype | PyTorch 为字符串或 PyTorch 数据类型,Paddle 为 字符串或 Paddle 数据类型,需要转写。 | ### 转写示例 - #### dst_type 参数:数据类型 - ```python # PyTorch 写法: module = torch.nn.Module() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad1d.md index 7e136850477..7a44f02546a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad1d.md @@ -1,12 +1,10 @@ ## [ 输入参数类型不一致 ]torch.nn.ReflectionPad1d ### [torch.nn.ReflectionPad1d](https://pytorch.org/docs/stable/generated/torch.nn.ReflectionPad1d.html?highlight=pad#torch.nn.ReflectionPad1d) - ```python torch.nn.ReflectionPad1d(padding) ``` ### [paddle.nn.Pad1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Pad1D_cn.html#pad1d) - ```python paddle.nn.Pad1D(padding, mode='constant', @@ -17,7 +15,6 @@ paddle.nn.Pad1D(padding, 其中 Paddle 与 PyTorch 的 padding 所支持的参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | padding | padding | 填充大小,PyTorch 和 Paddle 的 padding 参数的类型分别为 (int/tuple) 和 (int/Tensor/list),需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad2d.md index 94260bb684d..a457e160f23 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad2d.md @@ -1,12 +1,10 @@ ## [ 输入参数类型不一致 ]torch.nn.ReflectionPad2d ### [torch.nn.ReflectionPad2d](https://pytorch.org/docs/stable/generated/torch.nn.ReflectionPad2d.html?highlight=pad#torch.nn.ReflectionPad2d) - ```python torch.nn.ReflectionPad2d(padding) ``` ### [paddle.nn.Pad2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Pad2D_cn.html#pad2d) - ```python paddle.nn.Pad2D(padding, mode='constant', @@ -17,7 +15,6 @@ paddle.nn.Pad2D(padding, 其中 Paddle 与 PyTorch 的 padding 所支持的参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | padding | padding | 填充大小,PyTorch 和 Paddle 的 padding 参数的类型分别为 (int/tuple) 和 (int/Tensor/list)。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad3d.md index 6988f4dae3e..88761d18faf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReflectionPad3d.md @@ -1,12 +1,10 @@ ## [ 输入参数类型不一致 ]torch.nn.ReflectionPad3d ### [torch.nn.ReflectionPad3d](https://pytorch.org/docs/stable/generated/torch.nn.ReflectionPad3d.html?highlight=pad#torch.nn.ReflectionPad3d) - ```python torch.nn.ReflectionPad3d(padding) ``` ### [paddle.nn.Pad3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Pad3D_cn.html#pad3d) - ```python paddle.nn.Pad3D(padding, mode='constant', @@ -17,7 +15,6 @@ paddle.nn.Pad3D(padding, 其中 Paddle 与 PyTorch 的 padding 所支持的参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | padding | padding | 填充大小,PyTorch 和 Paddle 的 padding 参数的类型分别为 (int/tuple) 和 (int/Tensor/list)。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad1d.md index cd0707314c9..1aaac4e27af 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad1d.md @@ -1,12 +1,10 @@ ## [ 输入参数类型不一致 ]torch.nn.ReplicationPad1d ### [torch.nn.ReplicationPad1d](https://pytorch.org/docs/stable/generated/torch.nn.ReplicationPad1d.html?highlight=pad#torch.nn.ReplicationPad1d) - ```python torch.nn.ReplicationPad1d(padding) ``` ### [paddle.nn.Pad1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Pad1D_cn.html#pad1d) - ```python paddle.nn.Pad1D(padding, mode='constant', diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad2d.md index e329254466f..3122c709f25 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad2d.md @@ -1,12 +1,10 @@ ## [ 输入参数类型不一致 ]torch.nn.ReplicationPad2d ### [torch.nn.ReplicationPad2d](https://pytorch.org/docs/stable/generated/torch.nn.ReplicationPad2d.html?highlight=pad#torch.nn.ReplicationPad2d) - ```python torch.nn.ReplicationPad2d(padding) ``` ### [paddle.nn.Pad2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Pad2D_cn.html#pad2d) - ```python paddle.nn.Pad2D(padding, mode='constant', @@ -17,7 +15,6 @@ paddle.nn.Pad2D(padding, 其中 Paddle 与 PyTorch 的 padding 所支持的参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | padding | padding | 填充大小,PyTorch 和 Paddle 的 padding 参数的类型分别为 (int/tuple) 和 (int/Tensor/list) ,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad3d.md index 6eb7421c8b2..4c5583af438 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.nn.ReplicationPad3d.md @@ -1,12 +1,10 @@ ## [ 输入参数类型不一致 ]torch.nn.ReplicationPad3d ### [torch.nn.ReplicationPad3d](https://pytorch.org/docs/stable/generated/torch.nn.ReplicationPad3d.html?highlight=pad#torch.nn.ReplicationPad3d) - ```python torch.nn.ReplicationPad3d(padding) ``` ### [paddle.nn.Pad3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Pad3D_cn.html#pad3d) - ```python paddle.nn.Pad3D(padding, mode='constant', diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.set_default_device.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.set_default_device.md index 5aa8724aed8..f452ac889e8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.set_default_device.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.set_default_device.md @@ -1,20 +1,16 @@ ## [ 输入参数类型不一致 ]torch.set_default_device - ### [torch.set_default_device](https://pytorch.org/docs/stable/generated/torch.set_default_device.html#torch-set-default-device) - ```python torch.set_default_device(device) ``` ### [paddle.device.set_device](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/set_device_cn.html#set-device) - ```python paddle.device.set_device(device) ``` 功能一致,参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ |------------------------------------------------| | device | device | PyTorch 支持 torch.device 。PaddlePaddle 支持 str。 | @@ -22,7 +18,6 @@ paddle.device.set_device(device) ### 转写示例 #### device: 特定的运行设备 - ```python # PyTorch 写法 torch.set_default_device('cuda:0') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.set_default_tensor_type.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.set_default_tensor_type.md index a8d750aaecf..0d5c75a7a02 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.set_default_tensor_type.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torch.set_default_tensor_type.md @@ -1,13 +1,10 @@ ## [ 输入参数类型不一致 ]torch.set_default_tensor_type - ### [torch.set\_default\_tensor\_type](https://pytorch.org/docs/stable/generated/torch.set_default_tensor_type.html) - ```python torch.set_default_tensor_type(t) ``` ### [paddle.set\_default\_dtype](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/set_default_dtype_cn.html#set-default-dtype) - ```python paddle.set_default_dtype(d) ``` @@ -15,15 +12,12 @@ paddle.set_default_dtype(d) 两者功能一致但输入参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | t | d | 浮点张量类型或其名称。PyTorch 支持 `torch.FloatTensor` 或 "torch.FloatTensor",Paddle 只支持 `dtype`(如 `paddle.float32`),需要转写。 | ### 转写示例 - #### t 浮点张量类型或其名称 - ```python # PyTorch torch.set_default_tensor_type(torch.FloatTensor) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.io.decode_jpeg.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.io.decode_jpeg.md index f673340285a..c49ec7fb7a2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.io.decode_jpeg.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.io.decode_jpeg.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.io.decode_jpeg - +## [ 输入参数类型不一致 ]torchvision.io.decode_jpeg ### [torchvision.io.decode_jpeg](https://pytorch.org/vision/main/generated/torchvision.io.decode_jpeg.html) - ```python torchvision.io.decode_jpeg(input: Union[Tensor, List[Tensor]], mode: ImageReadMode = ImageReadMode.UNCHANGED, device: Union[str, device] = 'cpu', apply_exif_orientation: bool = False) ``` ### [paddle.vision.ops.decode_jpeg](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/ops/decode_jpeg_cn.html) - ```python paddle.vision.ops.decode_jpeg(x, mode='unchanged', name=None) ``` @@ -15,7 +12,6 @@ paddle.vision.ops.decode_jpeg(x, mode='unchanged', name=None) 两者功能一致,但输入参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------------------------- | ------------------ | -------- | | input | x | 包含 JPEG 图像原始字节,仅参数名不一致。 | @@ -24,7 +20,6 @@ paddle.vision.ops.decode_jpeg(x, mode='unchanged', name=None) | apply_exif_orientation | - | 对输出张量应用 EXIF 方向变换,Paddle 无此参数,暂无转写方式。 | ### 转写示例 - #### mode:转换图像模式选择 ```python # PyTorch 写法 @@ -35,7 +30,6 @@ paddle.vision.ops.decode_jpeg(x=image_bytes, mode='RGB') ``` ### device:解码后的图像将被存储到的设备 - ```python # PyTorch 写法 y = torchvision.io.decode_jpeg(input=image_bytes, device=torch.device('cpu')) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.alexnet.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.alexnet.md index 38dc194ed1a..a4751f5b596 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.alexnet.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.alexnet.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.alexnet - +## [ 输入参数类型不一致 ]torchvision.models.alexnet ### [torchvision.models.alexnet](https://pytorch.org/vision/stable/models/generated/torchvision.models.alexnet.html) - ```python torchvision.models.alexnet(*, weights: Optional[AlexNet_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.alexnet](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/alexnet_cn.html) - ```python paddle.vision.models.alexnet(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.alexnet(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 AlexNet_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet121.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet121.md index 509678e9206..39ac625f4db 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet121.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet121.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.densenet121 - +## [ 输入参数类型不一致 ]torchvision.models.densenet121 ### [torchvision.models.densenet121](https://pytorch.org/vision/main/models/generated/torchvision.models.densenet121.html) - ```python torchvision.models.densenet121(*, weights: Optional[DenseNet121_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.densenet121](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/densenet121_cn.html) - ```python paddle.vision.models.densenet121(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.densenet121(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 DenseNet121_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet161.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet161.md index 096c65c7519..baad33a3eca 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet161.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet161.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.densenet161 - +## [ 输入参数类型不一致 ]torchvision.models.densenet161 ### [torchvision.models.densenet161](https://pytorch.org/vision/main/models/generated/torchvision.models.densenet161.html) - ```python torchvision.models.densenet161(*, weights: Optional[DenseNet161_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.densenet161](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/densenet161_cn.html) - ```python paddle.vision.models.densenet161(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.densenet161(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 DenseNet161_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet169.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet169.md index 88be1b38246..acf891a857b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet169.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet169.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.densenet169 - +## [ 输入参数类型不一致 ]torchvision.models.densenet169 ### [torchvision.models.densenet169](https://pytorch.org/vision/main/models/generated/torchvision.models.densenet169.html) - ```python torchvision.models.densenet169(*, weights: Optional[DenseNet169_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.densenet169](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/densenet169_cn.html) - ```python paddle.vision.models.densenet169(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.densenet169(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 DenseNet169_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet201.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet201.md index dbf2340d61f..317af1d0fcc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet201.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.densenet201.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.densenet201 - +## [ 输入参数类型不一致 ]torchvision.models.densenet201 ### [torchvision.models.densenet201](https://pytorch.org/vision/main/models/generated/torchvision.models.densenet201.html) - ```python torchvision.models.densenet201(*, weights: Optional[DenseNet201_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.densenet201](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/densenet201_cn.html) - ```python paddle.vision.models.densenet201(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.densenet201(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 DenseNet201_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.googlenet.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.googlenet.md index 4ef7fc34cb8..bd4b177135e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.googlenet.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.googlenet.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.googlenet - +## [ 输入参数类型不一致 ]torchvision.models.googlenet ### [torchvision.models.googlenet](https://pytorch.org/vision/main/models/generated/torchvision.models.googlenet.html) - ```python torchvision.models.googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.googlenet](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/googlenet_cn.html) - ```python paddle.vision.models.googlenet(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.googlenet(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 GoogLeNet_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.inception_v3.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.inception_v3.md index c18416deb8d..4e663bc7ebe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.inception_v3.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.inception_v3.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.inception_v3 - +## [ 输入参数类型不一致 ]torchvision.models.inception_v3 ### [torchvision.models.inception_v3](https://pytorch.org/vision/main/models/generated/torchvision.models.inception_v3.html) - ```python torchvision.models.inception_v3(*, weights: Optional[Inception_V3_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.inception_v3](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/inception_v3_cn.html) - ```python paddle.vision.models.inception_v3(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.inception_v3(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 Inception_V3_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v2.md index 0de346f080c..985dfaf466f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v2.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.mobilenet_v2 - +## [ 输入参数类型不一致 ]torchvision.models.mobilenet_v2 ### [torchvision.models.mobilenet_v2](https://pytorch.org/vision/stable/models/generated/torchvision.models.mobilenet_v2.html) - ```python torchvision.models.mobilenet_v2(*, weights: Optional[MobileNet_V2_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.mobilenet_v2](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/mobilenet_v2_cn.html) - ```python paddle.vision.models.mobilenet_v2(pretrained=False, scale=1.0, **kwargs) ``` @@ -16,7 +13,6 @@ paddle.vision.models.mobilenet_v2(pretrained=False, scale=1.0, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 MobileNet_V2_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v3_large.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v3_large.md index fa64f081799..3f2eb292bd8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v3_large.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v3_large.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.mobilenet_v3_large - +## [ 输入参数类型不一致 ]torchvision.models.mobilenet_v3_large ### [torchvision.models.mobilenet_v3_large](https://pytorch.org/vision/main/models/generated/torchvision.models.mobilenet_v3_large.html) - ```python torchvision.models.mobilenet_v3_large(*, weights: Optional[MobileNet_V3_Large_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.mobilenet_v3_large](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/mobilenet_v3_large_cn.html) - ```python paddle.vision.models.mobilenet_v3_large(pretrained=False, scale=1.0, **kwargs) ``` @@ -16,7 +13,6 @@ paddle.vision.models.mobilenet_v3_large(pretrained=False, scale=1.0, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 MobileNet_V3_Large_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v3_small.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v3_small.md index 947228de5ea..ad4ca5bcdba 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v3_small.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.mobilenet_v3_small.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.mobilenet_v3_small - +## [ 输入参数类型不一致 ]torchvision.models.mobilenet_v3_small ### [torchvision.models.mobilenet_v3_small](https://pytorch.org/vision/main/models/generated/torchvision.models.mobilenet_v3_small.html) - ```python torchvision.models.mobilenet_v3_small(*, weights: Optional[MobileNet_V3_Small_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.mobilenet_v3_small](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/mobilenet_v3_small_cn.html) - ```python paddle.vision.models.mobilenet_v3_small(pretrained=False, scale=1.0, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.mobilenet_v3_small(pretrained=False, scale=1.0, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 MobileNet_V3_Small_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet101.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet101.md index a994c1d45c6..ddc5a367a8c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet101.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet101.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.resnet101 - +## [ 输入参数类型不一致 ]torchvision.models.resnet101 ### [torchvision.models.resnet101](https://pytorch.org/vision/stable/models/generated/torchvision.models.resnet101.html) - ```python torchvision.models.resnet101(*, weights: Optional[ResNet101_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.resnet101](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/resnet101_cn.html) - ```python paddle.vision.models.resnet101(pretrained=False, **kwargs) ``` @@ -16,7 +13,6 @@ paddle.vision.models.resnet101(pretrained=False, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ResNet101_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet152.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet152.md index aebd87cbfa6..8d706d7e1a4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet152.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet152.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.resnet152 - +## [ 输入参数类型不一致 ]torchvision.models.resnet152 ### [torchvision.models.resnet152](https://pytorch.org/vision/stable/models/generated/torchvision.models.resnet152.html) - ```python torchvision.models.resnet152(*, weights: Optional[ResNet152_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.resnet152](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/resnet152_cn.html) - ```python paddle.vision.models.resnet152(pretrained=False, **kwargs) ``` @@ -16,7 +13,6 @@ paddle.vision.models.resnet152(pretrained=False, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ResNet152_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet18.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet18.md index bd313c0f1f7..78b94dc13b8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet18.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet18.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.resnet18 - +## [ 输入参数类型不一致 ]torchvision.models.resnet18 ### [torchvision.models.resnet18](https://pytorch.org/vision/stable/models/generated/torchvision.models.resnet18.html) - ```python torchvision.models.resnet18(*, weights: Optional[ResNet18_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.resnet18](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/resnet18_cn.html) - ```python paddle.vision.models.resnet18(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.resnet18(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ResNet18_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet34.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet34.md index c3ee4af8572..0ffa296c5a9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet34.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet34.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.resnet34 - +## [ 输入参数类型不一致 ]torchvision.models.resnet34 ### [torchvision.models.resnet34](https://pytorch.org/vision/stable/models/generated/torchvision.models.resnet34.html) - ```python torchvision.models.resnet34(*, weights: Optional[ResNet34_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.resnet34](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/resnet34_cn.html) - ```python paddle.vision.models.resnet34(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.resnet34(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ResNet34_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet50.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet50.md index 9ab004a4073..5020883c15c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet50.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnet50.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.resnet50 - +## [ 输入参数类型不一致 ]torchvision.models.resnet50 ### [torchvision.models.resnet50](https://pytorch.org/vision/stable/models/generated/torchvision.models.resnet50.html) - ```python torchvision.models.resnet50(*, weights: Optional[ResNet50_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.resnet50](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/resnet50_cn.html) - ```python paddle.vision.models.resnet50(pretrained=False, **kwargs) ``` @@ -16,7 +13,6 @@ paddle.vision.models.resnet50(pretrained=False, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ResNet50_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnext101_64x4d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnext101_64x4d.md index 5cd12bcef91..4f4945eed0e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnext101_64x4d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnext101_64x4d.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.resnext101_64x4d - +## [ 输入参数类型不一致 ]torchvision.models.resnext101_64x4d ### [torchvision.models.resnext101_64x4d](https://pytorch.org/vision/main/models/generated/torchvision.models.resnext101_64x4d.html) - ```python torchvision.models.resnext101_64x4d(*, weights: Optional[ResNeXt101_64X4D_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.resnext101_64x4d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/resnext101_64x4d_cn.html) - ```python paddle.vision.models.resnext101_64x4d(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.resnext101_64x4d(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ResNeXt101_64X4D_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnext50_32x4d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnext50_32x4d.md index 594be11b39c..c2ce654e2dd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnext50_32x4d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.resnext50_32x4d.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.resnext50_32x4d - +## [ 输入参数类型不一致 ]torchvision.models.resnext50_32x4d ### [torchvision.models.resnext50_32x4d](https://pytorch.org/vision/main/models/generated/torchvision.models.resnext50_32x4d.html) - ```python torchvision.models.resnext50_32x4d(*, weights: Optional[ResNeXt50_32X4D_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.resnext50_32x4d](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/resnext50_32x4d_cn.html) - ```python paddle.vision.models.resnext50_32x4d(pretrained=False, **kwargs) ``` @@ -16,7 +13,6 @@ paddle.vision.models.resnext50_32x4d(pretrained=False, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ResNeXt50_32X4D_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x0_5.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x0_5.md index f491d259276..8b8c03e397b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x0_5.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x0_5.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.shufflenet_v2_x0_5 - +## [ 输入参数类型不一致 ]torchvision.models.shufflenet_v2_x0_5 ### [torchvision.models.shufflenet_v2_x0_5](https://pytorch.org/vision/main/models/generated/torchvision.models.shufflenet_v2_x0_5.html) - ```python torchvision.models.shufflenet_v2_x0_5(*, weights: Optional[ShuffleNet_V2_X0_5_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.shufflenet_v2_x0_5](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/shufflenet_v2_x0_5_cn.html) - ```python paddle.vision.models.shufflenet_v2_x0_5(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.shufflenet_v2_x0_5(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ShuffleNet_V2_X0_5_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x1_0.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x1_0.md index 58ac129a703..2131af251ad 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x1_0.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x1_0.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.shufflenet_v2_x1_0 - +## [ 输入参数类型不一致 ]torchvision.models.shufflenet_v2_x1_0 ### [torchvision.models.shufflenet_v2_x1_0](https://pytorch.org/vision/main/models/generated/torchvision.models.shufflenet_v2_x1_0.html) - ```python torchvision.models.shufflenet_v2_x1_0(*, weights: Optional[ShuffleNet_V2_X1_0_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.shufflenet_v2_x1_0](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/shufflenet_v2_x1_0_cn.html) - ```python paddle.vision.models.shufflenet_v2_x1_0(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.shufflenet_v2_x1_0(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ShuffleNet_V2_X1_0_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x1_5.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x1_5.md index 7ecefb82aaf..fc70a2cd4bd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x1_5.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x1_5.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.shufflenet_v2_x1_5 - +## [ 输入参数类型不一致 ]torchvision.models.shufflenet_v2_x1_5 ### [torchvision.models.shufflenet_v2_x1_5](https://pytorch.org/vision/main/models/generated/torchvision.models.shufflenet_v2_x1_5.html) - ```python torchvision.models.shufflenet_v2_x1_5(*, weights: Optional[ShuffleNet_V2_X1_5_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.shufflenet_v2_x1_5](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/shufflenet_v2_x1_5_cn.html) - ```python paddle.vision.models.shufflenet_v2_x1_5(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.shufflenet_v2_x1_5(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ShuffleNet_V2_X1_5_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x2_0.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x2_0.md index e297702271e..ef2011fb042 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x2_0.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.shufflenet_v2_x2_0.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.shufflenet_v2_x2_0 - +## [ 输入参数类型不一致 ]torchvision.models.shufflenet_v2_x2_0 ### [torchvision.models.shufflenet_v2_x2_0](https://pytorch.org/vision/main/models/generated/torchvision.models.shufflenet_v2_x2_0.html) - ```python torchvision.models.shufflenet_v2_x2_0(*, weights: Optional[ShuffleNet_V2_X2_0_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.shufflenet_v2_x2_0](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/shufflenet_v2_x2_0_cn.html) - ```python paddle.vision.models.shufflenet_v2_x2_0(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.shufflenet_v2_x2_0(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 ShuffleNet_V2_X2_0_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.squeezenet1_0.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.squeezenet1_0.md index 2d335a9baee..2b7662bed97 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.squeezenet1_0.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.squeezenet1_0.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.squeezenet1_0 - +## [ 输入参数类型不一致 ]torchvision.models.squeezenet1_0 ### [torchvision.models.squeezenet1_0](https://pytorch.org/vision/main/models/generated/torchvision.models.squeezenet1_0.html) - ```python torchvision.models.squeezenet1_0(*, weights: Optional[SqueezeNet1_0_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.squeezenet1_0](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/squeezenet1_0_cn.html) - ```python paddle.vision.models.squeezenet1_0(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.squeezenet1_0(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 SqueezeNet1_0_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.squeezenet1_1.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.squeezenet1_1.md index ac449bed7a1..a433b9cf399 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.squeezenet1_1.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.squeezenet1_1.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.squeezenet1_1 - +## [ 输入参数类型不一致 ]torchvision.models.squeezenet1_1 ### [torchvision.models.squeezenet1_1](https://pytorch.org/vision/main/models/generated/torchvision.models.squeezenet1_1.html) - ```python torchvision.models.squeezenet1_1(*, weights: Optional[SqueezeNet1_1_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.squeezenet1_1](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/squeezenet1_1_cn.html) - ```python paddle.vision.models.squeezenet1_1(pretrained=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.squeezenet1_1(pretrained=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 SqueezeNet1_1_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg11.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg11.md index 5b27ddd7e21..7aafd7c0899 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg11.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg11.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.vgg11 - +## [ 输入参数类型不一致 ]torchvision.models.vgg11 ### [torchvision.models.vgg11](https://pytorch.org/vision/main/models/generated/torchvision.models.vgg11.html) - ```python torchvision.models.vgg11(*, weights: Optional[VGG11_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.vgg11](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/vgg11_cn.html) - ```python paddle.vision.models.vgg11(pretrained=False, batch_norm=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.vgg11(pretrained=False, batch_norm=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 VGG11_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg11_bn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg11_bn.md index e7118734e71..63187d1def8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg11_bn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg11_bn.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.vgg11_bn - +## [ 输入参数类型不一致 ]torchvision.models.vgg11_bn ### [torchvision.models.vgg11_bn](https://pytorch.org/vision/main/models/generated/torchvision.models.vgg11_bn.html) - ```python torchvision.models.vgg11_bn(*, weights: Optional[VGG11_BN_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.vgg11](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/vgg11_cn.html) - ```python paddle.vision.models.vgg11(pretrained=False, batch_norm=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.vgg11(pretrained=False, batch_norm=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 VGG11_BN_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg13.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg13.md index 22c616c1d4a..4cea237b178 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg13.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg13.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.vgg13 - +## [ 输入参数类型不一致 ]torchvision.models.vgg13 ### [torchvision.models.vgg13](https://pytorch.org/vision/main/models/generated/torchvision.models.vgg13.html) - ```python torchvision.models.vgg13(*, weights: Optional[VGG13_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.vgg13](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/vgg13_cn.html) - ```python paddle.vision.models.vgg13(pretrained=False, batch_norm=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.vgg13(pretrained=False, batch_norm=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 VGG13_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg13_bn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg13_bn.md index e5a4159def9..3c8cd070bff 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg13_bn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg13_bn.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.vgg13_bn - +## [ 输入参数类型不一致 ]torchvision.models.vgg13_bn ### [torchvision.models.vgg13_bn](https://pytorch.org/vision/main/models/generated/torchvision.models.vgg13_bn.html) - ```python torchvision.models.vgg13_bn(*, weights: Optional[VGG13_BN_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.vgg13](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/vgg13_cn.html) - ```python paddle.vision.models.vgg13(pretrained=False, batch_norm=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.vgg13(pretrained=False, batch_norm=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 VGG13_BN_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg16.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg16.md index f021864c0e7..2dcf868b190 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg16.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg16.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.vgg16 - +## [ 输入参数类型不一致 ]torchvision.models.vgg16 ### [torchvision.models.vgg16](https://pytorch.org/vision/main/models/generated/torchvision.models.vgg16.html) - ```python torchvision.models.vgg16(*, weights: Optional[VGG16_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.vgg16](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/vgg16_cn.html) - ```python paddle.vision.models.vgg16(pretrained=False, batch_norm=False, **kwargs) ``` @@ -16,7 +13,6 @@ paddle.vision.models.vgg16(pretrained=False, batch_norm=False, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 VGG16_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg16_bn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg16_bn.md index 7a94fba834b..8e2fa7592a4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg16_bn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg16_bn.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.vgg16_bn - +## [ 输入参数类型不一致 ]torchvision.models.vgg16_bn ### [torchvision.models.vgg16_bn](https://pytorch.org/vision/main/models/generated/torchvision.models.vgg16_bn.html) - ```python torchvision.models.vgg16_bn(*, weights: Optional[VGG16_BN_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.vgg16](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/vgg16_cn.html) - ```python paddle.vision.models.vgg16(pretrained=False, batch_norm=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.vgg16(pretrained=False, batch_norm=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 VGG16_BN_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg19.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg19.md index 2be1c88ac68..d1b31ac4357 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg19.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg19.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.vgg19 - +## [ 输入参数类型不一致 ]torchvision.models.vgg19 ### [torchvision.models.vgg19](https://pytorch.org/vision/main/models/generated/torchvision.models.vgg19.html) - ```python torchvision.models.vgg19(*, weights: Optional[VGG19_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.vgg19](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/vgg19_cn.html) - ```python paddle.vision.models.vgg19(pretrained=False, batch_norm=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.vgg19(pretrained=False, batch_norm=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 VGG19_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg19_bn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg19_bn.md index ee0209ddc4e..61e64c79ac5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg19_bn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.vgg19_bn.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.vgg19_bn - +## [ 输入参数类型不一致 ]torchvision.models.vgg19_bn ### [torchvision.models.vgg19_bn](https://pytorch.org/vision/main/models/generated/torchvision.models.vgg19_bn.html) - ```python torchvision.models.vgg19_bn(*, weights: Optional[VGG19_BN_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.vgg19](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/vgg19_cn.html) - ```python paddle.vision.models.vgg19(pretrained=False, batch_norm=False, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.vision.models.vgg19(pretrained=False, batch_norm=False, **kwargs) 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 VGG19_BN_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.wide_resnet101_2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.wide_resnet101_2.md index 3f85cae98c6..677fdffc34d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.wide_resnet101_2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.wide_resnet101_2.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.wide_resnet101_2 - +## [ 输入参数类型不一致 ]torchvision.models.wide_resnet101_2 ### [torchvision.models.wide_resnet101_2](https://pytorch.org/vision/stable/models/generated/torchvision.models.wide_resnet101_2.html) - ```python torchvision.models.wide_resnet101_2(*, weights: Optional[WideResNet101_2_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.wide_resnet101_2](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/wide_resnet101_2_cn.html) - ```python paddle.vision.models.wide_resnet101_2(pretrained=False, **kwargs) ``` @@ -16,7 +13,6 @@ paddle.vision.models.wide_resnet101_2(pretrained=False, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 WideResNet101_2_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.wide_resnet50_2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.wide_resnet50_2.md index 079113bf4a8..c33587bb587 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.wide_resnet50_2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.models.wide_resnet50_2.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.models.wide_resnet50_2 - +## [ 输入参数类型不一致 ]torchvision.models.wide_resnet50_2 ### [torchvision.models.wide_resnet50_2](https://pytorch.org/vision/stable/models/generated/torchvision.models.wide_resnet50_2.html) - ```python torchvision.models.wide_resnet50_2(*, weights: Optional[WideResNet50_2_Weights] = None, progress: bool = True, **kwargs: Any) ``` ### [paddle.vision.models.wide_resnet50_2](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/models/wide_resnet50_2_cn.html) - ```python paddle.vision.models.wide_resnet50_2(pretrained=False, **kwargs) ``` @@ -17,7 +14,6 @@ paddle.vision.models.wide_resnet50_2(pretrained=False, **kwargs) 在使用模型转换工具 PaConvert 时,无论用户在 PyTorch 中选择使用哪种预训练权重类型,均会统一转换为 PaddlePaddle 中的 pretrained=True 参数配置。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ---- | | weights | pretrained | 预训练权重,PyTorch 参数 weights 为 WideResNet50_2_Weights 枚举类或 String 类型,Paddle 参数 pretrained 为 bool 类型,需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transform.functional.resize.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transform.functional.resize.md index 24eca4d9e55..0dc035c3f38 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transform.functional.resize.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transform.functional.resize.md @@ -1,7 +1,5 @@ -## [输入参数类型不一致]torchvision.transforms.functional.resize - +## [ 输入参数类型不一致 ]torchvision.transforms.functional.resize ### [torchvision.transforms.functional.resize](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.resize.html) - ```python torchvision.transforms.functional.resize(img: Tensor, size: Optional[Union[int, Sequence[int]]], interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, @@ -10,7 +8,6 @@ torchvision.transforms.functional.resize(img: Tensor, size: Optional[Union[int, ``` ### [paddle.vision.transforms.resize](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/resize_cn.html) - ```python paddle.vision.transforms.resize( img: Union[np.ndarray, paddle.Tensor, PIL.Image.Image], @@ -22,7 +19,6 @@ paddle.vision.transforms.resize( 两者功能一致,但输入参数类型不一致。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------- | | img | img | 输入数据。 | @@ -34,7 +30,6 @@ paddle.vision.transforms.resize( ### 转写示例 #### interpolation:插值的方法 - ```python # PyTorch 写法 resized_img = torchvision.transforms.functional.resize(img, size=(224, 224), interpolation=torchvision.transforms.InterpolationMode.BILINEAR) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomAffine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomAffine.md index 27d29fb9f4d..6798e209c23 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomAffine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomAffine.md @@ -1,7 +1,5 @@ -## [输入参数类型不一致] torchvision.transforms.RandomAffine - +## [ 输入参数类型不一致 ]torchvision.transforms.RandomAffine ### [torchvision.transforms.RandomAffine](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomAffine.html) - ```python torchvision.transforms.RandomAffine( degrees: Union[List[float], Tuple[float, ...], float], @@ -15,7 +13,6 @@ torchvision.transforms.RandomAffine( ``` ### [paddle.vision.transforms.RandomAffine](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomAffine_cn.html) - ```python paddle.vision.transforms.RandomAffine( degrees: Union[Tuple[float, float], float, int], @@ -32,7 +29,6 @@ paddle.vision.transforms.RandomAffine( 两者功能一致但参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------ | ---------------- | ------------------------ | | degrees | degrees | 随机旋转变换的角度大小。 | @@ -47,7 +43,6 @@ paddle.vision.transforms.RandomAffine( ### 转写示例 #### interpolation:插值的方法 - ```python # PyTorch 写法 transform = torchvision.transforms.RandomAffine(degrees=30, translate=(0.1, 0.2), scale=(0.8, 1.2), shear=10, interpolation=torchvision.transforms.InterpolationMode.BILINEAR, fill=0, center=(100, 100)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomPerspective.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomPerspective.md index f98723a477a..a67caed4896 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomPerspective.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomPerspective.md @@ -1,7 +1,5 @@ -## [输入参数类型不一致]torchvision.transforms.RandomPerspective - +## [ 输入参数类型不一致 ]torchvision.transforms.RandomPerspective ### [torchvision.transforms.RandomPerspective](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomPerspective.html?highlight=randomperspective#torchvision.transforms.RandomPerspective) - ```python torchvision.transforms.RandomPerspective( distortion_scale: float = 0.5, @@ -12,7 +10,6 @@ torchvision.transforms.RandomPerspective( ``` ### [paddle.vision.transforms.RandomPerspective](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomPerspective_cn.html) - ```python paddle.vision.transforms.RandomPerspective( prob: float = 0.5, @@ -26,7 +23,6 @@ paddle.vision.transforms.RandomPerspective( 两者功能一致,但参数类型不一致。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------------- | ------------------ | ----------- | | distortion_scale | distortion_scale | 控制失真程度。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomResizedCrop.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomResizedCrop.md index 58638795a55..6719c9dcf7f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomResizedCrop.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomResizedCrop.md @@ -1,7 +1,5 @@ -## [输入参数类型不一致]torchvision.transforms.RandomResizedCrop - +## [ 输入参数类型不一致 ]torchvision.transforms.RandomResizedCrop ### [torchvision.transforms.RandomResizedCrop](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomResizedCrop.html) - ```python torchvision.transforms.RandomResizedCrop( size: Union[int, List[int], Tuple[int, ...]], @@ -13,7 +11,6 @@ torchvision.transforms.RandomResizedCrop( ``` ### [paddle.vision.transforms.RandomResizedCrop](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomResizedCrop_cn.html) - ```python paddle.vision.transforms.RandomResizedCrop( size: Union[int, List[int], Tuple[int, ...]], @@ -27,7 +24,6 @@ paddle.vision.transforms.RandomResizedCrop( 两者功能一致,但参数类型不一致。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | --------------------- | ----------------- | --------------------- | | size | size | 裁剪后的图片大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomRotation.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomRotation.md index e49d7847347..d8d9f1b8f01 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomRotation.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.RandomRotation.md @@ -1,7 +1,5 @@ -## [输入参数类型不一致]torchvision.transforms.RandomRotation - +## [ 输入参数类型不一致 ]torchvision.transforms.RandomRotation ### [torchvision.transforms.RandomRotation](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomRotation.html) - ```python torchvision.transforms.RandomRotation( degrees: Union[int, List[float], Tuple[float, ...]], @@ -13,7 +11,6 @@ torchvision.transforms.RandomRotation( ``` ### [paddle.vision.transforms.RandomRotation](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomRotation_cn.html) - ```python paddle.vision.transforms.RandomRotation( degrees: Union[int, List[float], Tuple[float, ...]], @@ -28,7 +25,6 @@ paddle.vision.transforms.RandomRotation( 两者功能一致,但输入参数类型不一致。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------- | ------------------ | ----------------------------------------------- | | degrees | degrees | 旋转角度范围。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.Resize.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.Resize.md index c8afe940918..e894b0e9b6a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.Resize.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.Resize.md @@ -1,7 +1,5 @@ -## [输入参数类型不一致]torchvision.transforms.Resize - +## [ 输入参数类型不一致 ]torchvision.transforms.Resize ### [torchvision.transforms.Resize](https://pytorch.org/vision/stable/generated/torchvision.transforms.Resize.html#torchvision.transforms.Resize) - ```python torchvision.transforms.Resize( size: Optional[Union[int, List[int], Tuple[int, ...]]], @@ -12,7 +10,6 @@ torchvision.transforms.Resize( ``` ### [paddle.vision.transforms.Resize](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/Resize__upper_cn.html#resize) - ```python paddle.vision.transforms.Resize( size: Union[int, List[int], Tuple[int, ...]], @@ -24,7 +21,6 @@ paddle.vision.transforms.Resize( 两者功能一致,但输入参数类型不一致。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------- | --------------- | ------------------------------------------------------------ | | size | size | 输出图像大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.affine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.affine.md index 4757ad44b41..1118c45ae07 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.affine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.affine.md @@ -1,7 +1,5 @@ -## [输入参数类型不一致]torchvision.transforms.functional.affine - +## [ 输入参数类型不一致 ]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, angle: float, @@ -14,7 +12,6 @@ torchvision.transforms.functional.affine(img: Tensor, ``` ### [paddle.vision.transforms.affine](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/affine_cn.html) - ```python paddle.vision.transforms.affine( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor], @@ -31,7 +28,6 @@ paddle.vision.transforms.affine( 两者功能一致,但输入参数类型不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------- | ------------ | ------------------------------------------------------------ | | img | img | 输入图片。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.perspective.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.perspective.md index efa87beadd3..f779756a08f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.perspective.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.perspective.md @@ -1,7 +1,5 @@ -## [输入参数类型不一致]torchvision.transforms.functional.perspective - +## [ 输入参数类型不一致 ]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( img: Tensor, @@ -13,7 +11,6 @@ torchvision.transforms.functional.perspective( ``` ### [paddle.vision.transforms.perspective](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/transforms/perspective_cn.html#cn-api-paddle-vision-transforms-perspective) - ```python paddle.vision.transforms.perspective( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor], @@ -27,7 +24,6 @@ paddle.vision.transforms.perspective( 两者功能一致,但参数类型不一致。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ----------------- | ----------------- | ------------ | | img | img | 输入图片。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.rotate.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.rotate.md index 1b4dff4cea9..85989bc60a5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.rotate.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_type_diff/torchvision.transforms.functional.rotate.md @@ -1,13 +1,10 @@ -## [输入参数类型不一致]torchvision.transforms.functional.rotate - +## [ 输入参数类型不一致 ]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) ``` ### [paddle.vision.transforms.rotate](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/transforms/rotate_cn.html#cn-api-paddle-vision-transforms-rotate) - ```python paddle.vision.transforms.rotate(img, angle, interpolation='nearest', expand=False, center=None, fill=0) ``` @@ -15,7 +12,6 @@ paddle.vision.transforms.rotate(img, angle, interpolation='nearest', expand=Fals 两者功能一致,但输入参数类型不一致。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------------------------- | ------------------ | -------- | | img | img | 输入图片。| @@ -28,7 +24,6 @@ paddle.vision.transforms.rotate(img, angle, interpolation='nearest', expand=Fals ### 转写示例 #### interpolation:插值的方法 - ```python # PyTorch 写法 torchvision.transforms.functional.rotate(img, angle=90, interpolation=torchvision.transforms.InterpolationMode.BILINEAR) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.lstsq.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.lstsq.md index 1c18602c863..706c1c134de 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.lstsq.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.lstsq.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.Tensor.lstsq - ### [torch.Tensor.lstsq](https://pytorch.org/docs/1.9.0/generated/torch.Tensor.lstsq.html?highlight=torch%20tensor%20lstsq#torch.Tensor.lstsq) - ```python torch.Tensor.lstsq(A) ``` ### [paddle.Tensor.lstsq]() - ```python paddle.Tensor.lstsq(y, rcond=None, driver=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.lstsq(y, rcond=None, driver=None, name=None) 两者功能一致,输入参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------------------------------------------- | | A | - | 线性方程组系数矩阵,Paddle 需要转写。 | @@ -25,9 +21,7 @@ paddle.Tensor.lstsq(y, rcond=None, driver=None, name=None) | 返回值 | 返回值 | PyTorch 返回 solution、QR ,Paddle 返回 solution、residuals、rank、 singular_values,Paddle 与 PyTorch 仅第一个返回值相同,其他返回值结果不同,暂无转写方式。 | ### 转写示例 - #### A 参数转写 - ```python # PyTorch 写法: A = torch.tensor([[1, 1, 1], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.set_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.set_.md index 299779c649a..1d6b1504f1a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.set_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.set_.md @@ -1,12 +1,10 @@ ## [ 输入参数用法不一致 ]torch.Tensor.set_ ### [torch.Tensor.set_](https://pytorch.org/docs/stable/generated/torch.Tensor.set_.html) - ```python torch.Tensor.set_(source=None, storage_offset=0, size=None, stride=None) ``` ### [paddle.Tensor.set_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#set-source-none-shape-none-stride-none-offset-0-name-none) - ```python paddle.Tensor.set_(source=None, shape=None, stride=None, offset=0, name=None) ``` @@ -14,7 +12,6 @@ paddle.Tensor.set_(source=None, shape=None, stride=None, offset=0, name=None) 其中 PyTorch 的 `storage_offset` 与 Paddle 的 `offset` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | source | source | 设置的目标 Tensor。 | @@ -24,7 +21,6 @@ paddle.Tensor.set_(source=None, shape=None, stride=None, offset=0, name=None) ### 转写示例 - #### storage_offset 参数:float32 偏移量设置 ``` python # PyTorch 写法: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.split.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.split.md index 68eb4562de0..0e294681131 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.split.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.split.md @@ -1,20 +1,16 @@ ## [ 输入参数用法不一致 ]torch.Tensor.split - ### [torch.Tensor.split](https://pytorch.org/docs/stable/generated/torch.Tensor.split.html) - ```python torch.Tensor.split(split_size, dim=0) ``` ### [paddle.Tensor.split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#split-num-or-sections-axis-0-name-none) - ```python paddle.Tensor.split(num_or_sections, axis=0, name=None) ``` PyTorch 的 `split_size` 与 Paddle 的 `num_or_sections` 用法不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 表示需要分割的维度,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.svd.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.svd.md index 4965566ef88..23c5c5a5ae6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.svd.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.svd.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.Tensor.svd - ### [torch.Tensor.svd](https://pytorch.org/docs/stable/generated/torch.Tensor.svd.html#torch.Tensor.svd) - ```python torch.Tensor.svd(some=True, compute_uv=True) ``` @@ -14,7 +12,6 @@ paddle.linalg.svd(x, full_matrics=False, name=None) 两者参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | some | full_matrics | 是否计算完整的 U 和 V 矩阵,两者参数功能相反,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.tile.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.tile.md index 3ccdb602bdb..328a1b03e8b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.tile.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.tile.md @@ -1,13 +1,10 @@ -## [ 输入参数用法不一致 ] torch.Tensor.tile - +## [ 输入参数用法不一致 ]torch.Tensor.tile ### [torch.Tensor.tile](https://pytorch.org/docs/stable/generated/torch.Tensor.tile.html#torch.Tensor.tile) - ```python torch.Tensor.tile(*dims) ``` ### [paddle.Tensor.tile](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tile-repeat-times-name-none) - ```python paddle.Tensor.tile(repeat_times, name=None) ``` @@ -15,15 +12,12 @@ paddle.Tensor.tile(repeat_times, name=None) 两者功能一致,但 pytorch 的 `reps` 和 paddle 的 `repeat_times` 参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------ | | *dims | repeat_times | 维度复制次数, PyTorch 参数 dims 既可以是可变参数,也可以是 list/tuple/tensor 的形式, Paddle 参数 repeat_times 为 list/tuple/tensor 的形式。当 Pytorch 为可变参数的用法时,需要转写。 | ### 转写示例 - #### \*dims: 维度复制次数 - ```python # PyTorch 写法 x = torch.tensor([1, 2, 3]) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.transpose_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.transpose_.md index 24e3d68211e..dcd70a753b8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.transpose_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.transpose_.md @@ -1,20 +1,16 @@ ## [ 输入参数用法不一致 ]torch.Tensor.transpose_ - ### [torch.Tensor.transpose_](https://pytorch.org/docs/stable/generated/torch.Tensor.transpose_.html) - ```python torch.Tensor.transpose_(dim0, dim1) ``` ### [paddle.Tensor.transpose_]() - ```python paddle.Tensor.transpose_(perm, name=None) ``` PyTorch 的 `dim0, dim1` 与 Paddle 的 `perm` 用法不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim0, dim1 | perm | torch 的 dim0 与 dim1 表示要交换的两个维度, 为整数。 paddle 的 perm 表示重排的维度序列,为 list/tuple 。需要转写。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.where.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.where.md index 80725f504c7..76a6ecd9318 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.where.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.Tensor.where.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.Tensor.where - ### [torch.Tensor.where](https://pytorch.org/docs/stable/generated/torch.Tensor.where.html#torch.Tensor.where) - ```python torch.Tensor.where(condition, other) ``` ### [paddle.where](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/where_cn.html) - ```python paddle.where(condition, x=None, y=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.where(condition, x=None, y=None, name=None) Pytorch 为 Tensor 类方法,Paddle 为普通函数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | condition | condition | 判断条件。| @@ -23,7 +19,6 @@ Pytorch 为 Tensor 类方法,Paddle 为普通函数,具体如下: | other | y | 当 condition 为 false 时,选择的元素,仅参数名不一致。| ### 转写示例 - ```python # torch 写法 a = torch.tensor([0, 1, 2]) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_1d.md index ef804447620..2529b76ff54 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_1d.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.atleast_1d - ### [torch.atleast_1d](https://pytorch.org/docs/stable/generated/torch.atleast_1d.html#torch-atleast-1d) - ```python torch.atleast_1d(*tensors) ``` ### [paddle.atleast_1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/atleast_1d_cn.html#atleast_1d) - ```python paddle.atleast_1d(*inputs, name=None) ``` @@ -15,7 +12,6 @@ paddle.atleast_1d(*inputs, name=None) PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | inputs | 输入的 Tensor,仅当 torch 输入为 tuple(Tensor)时,两者处理方式不一致,需要转写。其他情形下均一致。 | @@ -23,9 +19,7 @@ PyTorch 与 Paddle 参数不一致,具体如下: PyTorch 与 Paddle 功能一致,但对于由多个 Tensor 组成 tuple|list 输入的处理方式略有不同,具体请看转写示例。 ### 转写示例 - #### tensors: 输入为 tuple(Tensor)时 - ```python # PyTorch 写法 torch.atleast_1d((x, y)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_2d.md index 3bf23506e5a..148d72b3f15 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_2d.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.atleast_2d - ### [torch.atleast_2d](https://pytorch.org/docs/stable/generated/torch.atleast_2d.html#torch-atleast-2d) - ```python torch.atleast_2d(*tensors) ``` ### [paddle.atleast_2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/atleast_2d_cn.html#atleast_2d) - ```python paddle.atleast_2d(*inputs, name=None) ``` @@ -15,7 +12,6 @@ paddle.atleast_2d(*inputs, name=None) PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | inputs | 输入的 Tensor,仅当 torch 输入为 tuple(Tensor)时,两者处理方式不一致,需要转写。其他情形下均一致。 | @@ -23,9 +19,7 @@ PyTorch 与 Paddle 参数不一致,具体如下: PyTorch 与 Paddle 功能一致,但对于由多个 Tensor 组成 tuple|list 输入的处理方式略有不同,具体请看转写示例。 ### 转写示例 - #### tensors: 输入为 tuple(Tensor)时 - ```python # PyTorch 写法 torch.atleast_2d((x, y)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_3d.md index 0be78693aad..caddf849cbe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.atleast_3d.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.atleast_3d - ### [torch.atleast_3d](https://pytorch.org/docs/stable/generated/torch.atleast_3d.html#torch-atleast-3d) - ```python torch.atleast_3d(*tensors) ``` ### [paddle.atleast_3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/atleast_3d_cn.html#atleast_3d) - ```python paddle.atleast_3d(*inputs, name=None) ``` @@ -15,7 +12,6 @@ paddle.atleast_3d(*inputs, name=None) PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | inputs | 输入的 Tensor,仅当 torch 输入为 tuple(Tensor)时,两者处理方式不一致,需要转写。其他情形下均一致。 | @@ -23,9 +19,7 @@ PyTorch 与 Paddle 参数不一致,具体如下: PyTorch 与 Paddle 功能一致,但对于由多个 Tensor 组成 tuple|list 输入的处理方式略有不同,具体请看转写示例。 ### 转写示例 - #### tensors: 输入为 tuple(Tensor)时 - ```python # PyTorch 写法 torch.atleast_3d((x, y)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.cuda.Stream__upper.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.cuda.Stream__upper.md index d1e95623fc0..49d337cc860 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.cuda.Stream__upper.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.cuda.Stream__upper.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.cuda.Stream - ### [torch.cuda.Stream](https://pytorch.org/docs/stable/generated/torch.cuda.Stream.html#torch.cuda.Stream) - ```python torch.cuda.Stream(device=None, priority=0, **kwargs) ``` ### [paddle.device.Stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/Stream_cn.html#stream) - ```python paddle.device.Stream(device=None, priority=None) ``` @@ -15,16 +12,13 @@ paddle.device.Stream(device=None, priority=None) 两者功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | ----------------------------------------------------------------------------------------- | | device | device | 希望分配 stream 的设备。 | | priority | priority | stream 的优先级,PyTorch 取值范围为-1、0,Paddle 的取值范围为 1、2,需要转写。 | ### 转写示例 - #### priority: stream 的优先级 - ```python # PyTorch 写法 torch.cuda.Stream(priority=0) @@ -34,7 +28,6 @@ paddle.device.Stream(priority=2) ``` #### device: 希望分配 stream 的设备 - ```python # PyTorch 写法 torch.cuda.Stream('cuda:0') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather.md index f667f49f97a..ccfb87ba94e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.all_gather - ### [torch.distributed.all_gather](https://pytorch.org/docs/stable/distributed.html#torch.distributed.all_gather) - ```python torch.distributed.all_gather(tensor_list, tensor, group=None, async_op=False) ``` ### [paddle.distributed.all_gather](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/all_gather_cn.html) - ```python paddle.distributed.all_gather(tensor_list, tensor, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.all_gather(tensor_list, tensor, group=None, sync_op=True) 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | --------------------------------------------------------------- | | tensor_list | tensor_list | 操作的输出 Tensor 列表。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather_into_tensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather_into_tensor.md index 47835fa68eb..cea6f58de7a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather_into_tensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather_into_tensor.md @@ -1,14 +1,11 @@ ## [ 输入参数用法不一致 ]torch.distributed.all_gather_into_tensor - ### [torch.distributed.all_gather_into_tensor](https://docs.pytorch.org/docs/stable/distributed.html#torch.distributed.all_gather_into_tensor) - ```python torch.distributed.all_gather_into_tensor(output_tensor, input_tensor, group=None, async_op=False) ``` ### [paddle.distributed.all_gather](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/all_gather_cn.html#all-gather) - ```python paddle.distributed.all_gather(tensor_list, tensor, group=None, sync_op=True) ``` @@ -16,7 +13,6 @@ paddle.distributed.all_gather(tensor_list, tensor, group=None, sync_op=True) 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------- | | output_tensor | tensor_list | 表示用于保存聚合结果的张量,torch 为 Tensor, Paddle 为 list,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather_object.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather_object.md index a9d010e3772..0a3d25e5a75 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather_object.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_gather_object.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.all_gather_object - ### [torch.distributed.all_gather_object](https://pytorch.org/docs/stable/distributed.html?highlight=all_gather_object#torch.distributed.all_gather_object) - ```python torch.distributed.all_gather_object(object_list, obj, group=None) ``` ### [paddle.distributed.all_gather_object](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distributed/all_gather_object_cn.html) - ```python paddle.distributed.all_gather_object(object_list, obj, group=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.all_gather_object(object_list, obj, group=None) 功能一致,参数几乎完全一致。但`object_list`的初始化方式不同。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------- | | object_list | object_list | 表示用于保存聚合结果的列表。PyTorch 需初始化成与 `group` 等长的列表, Paddle 需初始化为空列表,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_reduce.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_reduce.md index 44fef890700..5f8d1fddfce 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_reduce.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_reduce.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.all_reduce - ### [torch.distributed.all_reduce](https://pytorch.org/docs/stable/distributed.html#torch.distributed.all_reduce) - ```python torch.distributed.all_reduce(tensor, op=, group=None, async_op=False) ``` ### [paddle.distributed.all_reduce](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/all_reduce_cn.html) - ```python paddle.distributed.all_reduce(tensor, op=ReduceOp.SUM, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.all_reduce(tensor, op=ReduceOp.SUM, group=None, sync_op=True) 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------------------------- | | tensor | tensor | 操作的输入 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_to_all.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_to_all.md index 021f2cbf5a4..b03b24913ee 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_to_all.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_to_all.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.all_to_all - ### [torch.distributed.all_to_all](https://pytorch.org/docs/stable/distributed.html#torch.distributed.all_to_all) - ```python torch.distributed.all_to_all(output_tensor_list, input_tensor_list, group=None, async_op=False) ``` ### [paddle.distributed.alltoall](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/alltoall_cn.html) - ```python paddle.distributed.alltoall(in_tensor_list, out_tensor_list, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.alltoall(in_tensor_list, out_tensor_list, group=None, sync_op 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------ | --------------- | --------------------------------------------------------------- | | output_tensor_list | out_tensor_list | 包含所有输出 Tensors 的一个列表,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_to_all_single.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_to_all_single.md index b21a28c6f48..430c982f624 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_to_all_single.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.all_to_all_single.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.all_to_all_single - ### [torch.distributed.all_to_all_single](https://pytorch.org/docs/stable/distributed.html#torch.distributed.all_to_all_single) - ```python torch.distributed.all_to_all_single(output, input, output_split_sizes=None, input_split_sizes=None, group=None, async_op=False) ``` ### [paddle.distributed.alltoall_single](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/alltoall_single_cn.html#alltoall-single) - ```python paddle.distributed.alltoall_single(out_tensor, in_tensor, in_split_sizes=None, out_split_sizes=None, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.alltoall_single(out_tensor, in_tensor, in_split_sizes=None, o 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------ | --------------- | --------------------------------------------------------------- | | output | out_tensor | 用于保存操作结果的 Tensor,仅参数名不一致。 | @@ -28,7 +24,6 @@ paddle.distributed.alltoall_single(out_tensor, in_tensor, in_split_sizes=None, o ### 转写示例 #### async_op:是否为异步操作 - ```python # PyTorch 写法: torch.distributed.all_to_all_single(output=output, input=input, async_op=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.broadcast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.broadcast.md index 3dca94fffda..73231148c04 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.broadcast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.broadcast.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.broadcast - ### [torch.distributed.broadcast](https://pytorch.org/docs/stable/distributed.html#torch.distributed.broadcast) - ```python torch.distributed.broadcast(tensor, src, group=None, async_op=False) ``` ### [paddle.distributed.broadcast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/broadcast_cn.html) - ```python paddle.distributed.broadcast(tensor, src, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.broadcast(tensor, src, group=None, sync_op=True) 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | ------------------------------------------------------------------------------------------------------ | | tensor | tensor | 如果当前进程编号是源,那么这个 Tensor 变量将被发送给其他进程,否则这个 Tensor 将接收源发送过来的数据。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.gather.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.gather.md index 077d7476916..5f8121162d6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.gather.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.gather.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.gather - ### [torch.distributed.gather](https://pytorch.org/docs/stable/distributed.html#torch.distributed.gather) - ```python torch.distributed.gather(tensor, gather_list=None, dst=0, group=None, async_op=False) ``` ### [paddle.distributed.gather](https://github.com/PaddlePaddle/Paddle/blob/c8ccc9b154632ef41ade1b8e97b87d54fde7e8f8/python/paddle/distributed/communication/gather.py#L20C71-L20C71) - ```python paddle.distributed.gather(tensor, gather_list=None, dst=0, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.gather(tensor, gather_list=None, dst=0, group=None, sync_op=T 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | --------------------------------------------------------------- | | tensor | tensor | 操作的输入 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.optim.DistributedOptimizer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.optim.DistributedOptimizer.md index e2204e54593..3ad526e5384 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.optim.DistributedOptimizer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.optim.DistributedOptimizer.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.optim.DistributedOptimizer - ### [torch.distributed.optim.DistributedOptimizer](https://pytorch.org/docs/stable/distributed.optim.html) - ```python torch.distributed.optim.DistributedOptimizer(optimizer_class, params_rref, *args, **kwargs) ``` ### [paddle.distributed.fleet.distributed_optimizer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/fleet/Fleet_cn.html#cn-api-paddle-distributed-fleet-fleet) - ```python paddle.distributed.fleet.distributed_optimizer(optimizer, strategy=None) ``` @@ -16,7 +13,6 @@ paddle.distributed.fleet.distributed_optimizer(optimizer, strategy=None) ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------------- | ------------ | --------------------------------------------------------------------- | | optimizer_class | optimizer | 优化器,PyTorch 输入为 class, Paddle 输入为实例化的 optimizer。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.reduce.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.reduce.md index 34213083f11..eedf23c62cb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.reduce.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.reduce.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.reduce - ### [torch.distributed.reduce](https://pytorch.org/docs/stable/distributed.html#torch.distributed.reduce) - ```python torch.distributed.reduce(tensor, dst, op=, group=None, async_op=False) ``` ### [paddle.distributed.reduce](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/reduce_cn.html) - ```python paddle.distributed.reduce(tensor, dst, op=ReduceOp.SUM, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.reduce(tensor, dst, op=ReduceOp.SUM, group=None, sync_op=True 两者功能一致但参数不一致,其中 PyTorch 的 async_op 与 Paddle 的 sync_op 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------- | | tensor | tensor | 表示操作的输入 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.reduce_scatter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.reduce_scatter.md index 53fd8efbe7d..cab600e65b0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.reduce_scatter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.reduce_scatter.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.reduce_scatter - ### [torch.distributed.reduce_scatter](https://pytorch.org/docs/stable/distributed.html#torch.distributed.reduce_scatter) - ```python torch.distributed.reduce_scatter(output, input_list, op=, group=None, async_op=False) ``` ### [paddle.distributed.reduce_scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/reduce_scatter_cn.html#reduce-scatter) - ```python paddle.distributed.reduce_scatter(tensor, tensor_list, op=ReduceOp.SUM, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.reduce_scatter(tensor, tensor_list, op=ReduceOp.SUM, group=No 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | ---------------------------------------------------------------------- | | output | tensor | 用于接收数据的 tensor,仅参数名不一致。 | @@ -25,9 +21,7 @@ paddle.distributed.reduce_scatter(tensor, tensor_list, op=ReduceOp.SUM, group=No | async_op | sync_op | 该操作是否为异步或同步操作,PyTorch 和 Paddle 取值相反,需要转写。 | ### 转写示例 - #### async_op 参数:该操作是否为异步或同步操作 - ```python # PyTorch 写法: torch.distributed.reduce_scatter(data1, [data1, data2], async_op=False) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.rpc.rpc_async.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.rpc.rpc_async.md index 0da6723ef57..7f08b821c76 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.rpc.rpc_async.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.rpc.rpc_async.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torch.distributed.rpc.rpc_async - +## [ 输入参数用法不一致 ]torch.distributed.rpc.rpc_async ### [torch.distributed.rpc.rpc_async](https://pytorch.org/docs/stable/rpc.html#torch.distributed.rpc.rpc_async) - ```python torch.distributed.rpc.rpc_async(to, func, args=None, kwargs=None, timeout=- 1.0) ``` ### [paddle.distributed.rpc.rpc_async](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/rpc/rpc_async_cn.html#rpc-async) - ```python paddle.distributed.rpc.rpc_async(to, fn, args=None, kwargs=None, timeout=- 1) ``` @@ -15,7 +12,6 @@ paddle.distributed.rpc.rpc_async(to, fn, args=None, kwargs=None, timeout=- 1) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------- | | to | to | 目标 worker 的名字。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.rpc.rpc_sync.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.rpc.rpc_sync.md index baf36a20b02..51d86fc6c65 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.rpc.rpc_sync.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.rpc.rpc_sync.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torch.distributed.rpc.rpc_sync - +## [ 输入参数用法不一致 ]torch.distributed.rpc.rpc_sync ### [torch.distributed.rpc.rpc_sync](https://pytorch.org/docs/stable/rpc.html#torch.distributed.rpc.rpc_sync) - ```python torch.distributed.rpc.rpc_sync(to, func, args=None, kwargs=None, timeout=- 1.0) ``` ### [paddle.distributed.rpc.rpc_sync](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/rpc/rpc_sync_cn.html) - ```python paddle.distributed.rpc.rpc_sync(to, fn, args=None, kwargs=None, timeout=- 1) ``` @@ -15,7 +12,6 @@ paddle.distributed.rpc.rpc_sync(to, fn, args=None, kwargs=None, timeout=- 1) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------- | | to | to | 目标 worker 的名字。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.scatter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.scatter.md index 20187bd69a6..fdc0ae3dc81 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.scatter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.distributed.scatter.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.distributed.scatter - ### [torch.distributed.scatter](https://pytorch.org/docs/stable/distributed.html#torch.distributed.scatter) - ```python torch.distributed.scatter(tensor, scatter_list=None, src=0, group=None, async_op=False) ``` ### [paddle.distributed.scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/scatter_cn.html) - ```python paddle.distributed.scatter(tensor, tensor_list=None, src=0, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.scatter(tensor, tensor_list=None, src=0, group=None, sync_op= 其中 PyTorch 和 Paddle 功能一致,参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | --------------------------------------------------------------- | | tensor | tensor | 操作的输出 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool1d.md index 2194f4afc22..9e5dc43e045 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool1d.md @@ -1,6 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.AvgPool1d ### [torch.nn.AvgPool1d](https://pytorch.org/docs/stable/generated/torch.nn.AvgPool1d.html?highlight=avgpool1d#torch.nn.AvgPool1d) - ```python torch.nn.AvgPool1d(kernel_size, stride=None, @@ -10,7 +9,6 @@ torch.nn.AvgPool1d(kernel_size, ``` ### [paddle.nn.AvgPool1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/AvgPool1D_cn.html#avgpool1d) - ```python paddle.nn.AvgPool1D(kernel_size, stride=None, @@ -22,7 +20,6 @@ paddle.nn.AvgPool1D(kernel_size, 其中 PyTorch 的 count_include_pad 与 Paddle 的 exclusive 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示池化核的尺寸大小 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool2d.md index 396605018db..c84e3496a58 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool2d.md @@ -1,6 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.AvgPool2d ### [torch.nn.AvgPool2d](https://pytorch.org/docs/stable/generated/torch.nn.AvgPool2d.html?highlight=avgpool2d#torch.nn.AvgPool2d) - ```python torch.nn.AvgPool2d(kernel_size, stride=None, @@ -11,7 +10,6 @@ torch.nn.AvgPool2d(kernel_size, ``` ### [paddle.nn.AvgPool2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/AvgPool2D_cn.html#avgpool2d) - ```python paddle.nn.AvgPool2D(kernel_size, stride=None, @@ -25,7 +23,6 @@ paddle.nn.AvgPool2D(kernel_size, 其中 PyTorch 的 count_include_pad 与 Paddle 的 exclusive 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示池化核的尺寸大小 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool3d.md index 59e17ae0064..027a7add23d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.AvgPool3d.md @@ -1,6 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.AvgPool3d ### [torch.nn.AvgPool3d](https://pytorch.org/docs/stable/generated/torch.nn.AvgPool3d.html?highlight=avgpool3d#torch.nn.AvgPool3d) - ```python torch.nn.AvgPool3d(kernel_size, stride=None, @@ -11,7 +10,6 @@ torch.nn.AvgPool3d(kernel_size, ``` ### [paddle.nn.AvgPool3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/AvgPool3D_cn.html#avgpool3d) - ```python paddle.nn.AvgPool3D(kernel_size, stride=None, @@ -25,7 +23,6 @@ paddle.nn.AvgPool3D(kernel_size, 其中 PyTorch 的 count_include_pad 与 Paddle 的 exclusive 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示池化核的尺寸大小 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm1d.md index 25985601d59..d2beb22f676 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm1d.md @@ -1,6 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.BatchNorm1d ### [torch.nn.BatchNorm1d](https://pytorch.org/docs/stable/generated/torch.nn.BatchNorm1d.html?highlight=torch%20nn%20batchnorm1d#torch.nn.BatchNorm1d) - ```python torch.nn.BatchNorm1d(num_features, eps=1e-05, @@ -12,7 +11,6 @@ torch.nn.BatchNorm1d(num_features, ``` ### [paddle.nn.BatchNorm1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/BatchNorm1D_cn.html#batchnorm1d) - ```python paddle.nn.BatchNorm1D(num_features, momentum=0.9, @@ -26,7 +24,6 @@ paddle.nn.BatchNorm1D(num_features, 两者功能一致但参数不一致,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ |-----------------------------------------------------------------------------------------------------------------------------| | num_features | num_features | 表示输入 Tensor 通道数。 | @@ -70,7 +67,6 @@ m = paddle.nn.BatchNorm1D(24, momentum=0.8) ``` #### track_running_stats:指示是否使用全局均值和方差 - ```python track_running_stats=None 时: # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm2d.md index 7922844a3d5..d36642d9702 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm2d.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.BatchNorm2d - ### [torch.nn.BatchNorm2d](https://pytorch.org/docs/stable/generated/torch.nn.BatchNorm2d.html?highlight=batchnorm2d#torch.nn.BatchNorm2d) - ```python torch.nn.BatchNorm2d(num_features, eps=1e-05, @@ -13,7 +11,6 @@ torch.nn.BatchNorm2d(num_features, ``` ### [paddle.nn.BatchNorm2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/BatchNorm2D_cn.html#batchnorm2d) - ```python paddle.nn.BatchNorm2D(num_features, momentum=0.9, @@ -28,7 +25,6 @@ paddle.nn.BatchNorm2D(num_features, 两者功能一致但参数不一致,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |---------------------|------------------|---------------------------------------------------------------------------------------------------------------------| | num_features | num_features | 表示输入 Tensor 通道数。 | @@ -43,9 +39,7 @@ paddle.nn.BatchNorm2D(num_features, | dtype | - | 指定权重参数属性的对象,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - #### affine:是否进行反射变换 - ```python affine = False 时,表示不更新: @@ -67,7 +61,6 @@ m = paddle.nn.BatchNorm2D(24) ``` #### momentum: - ```python # PyTorch 写法 m = torch.nn.BatchNorm2D(24, momentum=0.2) @@ -77,7 +70,6 @@ m = paddle.nn.BatchNorm2D(24, momentum=0.8) ``` #### track_running_stats:指示是否使用全局均值和方差 - ```python track_running_stats=None 时: # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm3d.md index ec0e89cbece..d52c664e42e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.BatchNorm3d.md @@ -1,6 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.BatchNorm3d ### [torch.nn.BatchNorm3d](https://pytorch.org/docs/stable/generated/torch.nn.BatchNorm3d.html?highlight=torch%20nn%20batchnorm3d#torch.nn.BatchNorm3d) - ```python torch.nn.BatchNorm3d(num_features, eps=1e-05, @@ -12,7 +11,6 @@ torch.nn.BatchNorm3d(num_features, ``` ### [paddle.nn.BatchNorm3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/BatchNorm3D_cn.html#batchnorm3d) - ```python paddle.nn.BatchNorm3D(num_features, momentum=0.9, @@ -26,7 +24,6 @@ paddle.nn.BatchNorm3D(num_features, 两者功能一致但参数不一致,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | num_features | num_features | 表示输入 Tensor 通道数。 | @@ -69,7 +66,6 @@ m = torch.nn.BatchNorm3D(24, momentum=0.2) m = paddle.nn.BatchNorm3D(24, momentum=0.8) ``` #### track_running_stats:指示是否使用全局均值和方差 - ```python track_running_stats=None 时: # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose1d.md index 17bdbf19a50..fddf9988200 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose1d.md @@ -32,7 +32,6 @@ paddle.nn.Conv1DTranspose(in_channels, 其中 PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | in_channels | in_channels | 表示输入 Tensor 通道数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose2d.md index ae2c9c0a728..11d137af595 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose2d.md @@ -32,7 +32,6 @@ paddle.nn.Conv2DTranspose(in_channels, 其中 PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | in_channels | in_channels | 表示输入 Tensor 通道数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose3d.md index 1b06d12e35e..e00c8b7c5f8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.ConvTranspose3d.md @@ -34,7 +34,6 @@ paddle.nn.Conv3DTranspose(in_channels, 其中 PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | in_channels | in_channels | 表示输入 Tensor 通道数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.GRU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.GRU.md index 0f80f94aab6..585570daa9e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.GRU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.GRU.md @@ -28,7 +28,6 @@ paddle.nn.GRU(input_size, 两者功能一致但参数不一致,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input_size | input_size | 表示输入 x 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.InstanceNorm1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.InstanceNorm1d.md index f71a317a2e3..63b5cebe0f6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.InstanceNorm1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.InstanceNorm1d.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.InstanceNorm1d - ### [torch.nn.InstanceNorm1d](https://pytorch.org/docs/stable/generated/torch.nn.InstanceNorm1d.html#torch.nn.InstanceNorm1d) - ```python torch.nn.InstanceNorm1d(num_features, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False, device=None, dtype=None) ``` @@ -13,7 +11,6 @@ paddle.nn.InstanceNorm1D(num_features, epsilon=1e-05, momentum=0.9, weight_attr= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | num_features | num_features | 指明输入的通道数量 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.InstanceNorm2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.InstanceNorm2d.md index 2faa1735bbc..c57eee9703a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.InstanceNorm2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.InstanceNorm2d.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.InstanceNorm2d - ### [torch.nn.InstanceNorm2d](https://pytorch.org/docs/stable/generated/torch.nn.InstanceNorm2d.html#torch.nn.InstanceNorm2d) - ```python torch.nn.InstanceNorm2d(num_features, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False, device=None, dtype=None) ``` @@ -13,7 +11,6 @@ paddle.nn.InstanceNorm2D(num_features, epsilon=1e-05, momentum=0.9, weight_attr= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | num_features | num_features | 指明输入的通道数量。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.LSTM.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.LSTM.md index 4584fdf6908..c035e5b283d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.LSTM.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.LSTM.md @@ -1,6 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.LSTM ### [torch.nn.LSTM](https://pytorch.org/docs/stable/generated/torch.nn.LSTM.html?highlight=lstm#torch.nn.LSTM) - ```python torch.nn.LSTM(input_size, hidden_size, @@ -15,7 +14,6 @@ torch.nn.LSTM(input_size, ``` ### [paddle.nn.LSTM](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/LSTM_cn.html#lstm) - ```python paddle.nn.LSTM(input_size, hidden_size, @@ -33,7 +31,6 @@ paddle.nn.LSTM(input_size, 两者功能一致但参数不一致,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input_size | input_size | 表示输入 x 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Linear.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Linear.md index d7668abe13c..f79bdd9735c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Linear.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Linear.md @@ -1,6 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.Linear ### [torch.nn.Linear](https://pytorch.org/docs/stable/generated/torch.nn.Linear.html?highlight=linear#torch.nn.Linear) - ```python torch.nn.Linear(in_features, out_features, @@ -10,7 +9,6 @@ torch.nn.Linear(in_features, ``` ### [paddle.nn.Linear](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Linear_cn.html#linear) - ```python paddle.nn.Linear(in_features, out_features, @@ -21,7 +19,6 @@ paddle.nn.Linear(in_features, 其中 PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | in_features | in_features | 表示线性变换层输入单元的数目。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Module.xpu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Module.xpu.md index 1de3f2f55fd..f971b250cdc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Module.xpu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Module.xpu.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.nn.Module.xpu - ### [torch.nn.Module.xpu](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.xpu) - ```python torch.nn.Module.xpu(device=None) ``` ### [paddle.nn.Layer.to](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#to-device-none-dtype-none-blocking-none) - ```python paddle.nn.Layer.to(device="xpu") ``` @@ -15,15 +12,12 @@ paddle.nn.Layer.to(device="xpu") 两者参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------------- | | device | device | PyTorch 为设备编号,Paddle 为 xpu:设备编号,需要转写。 | ### 转写示例 - #### device 参数:设备 - ```python # PyTorch 写法: module = torch.nn.Module() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Module.zero_grad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Module.zero_grad.md index c8bab45c525..b051ed13fdf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Module.zero_grad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.Module.zero_grad.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.nn.Module.zero_grad - ### [torch.nn.Module.zero_grad](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.zero_grad) - ```python torch.nn.Module.zero_grad(set_to_none=True) ``` ### [paddle.nn.Layer.clear_gradients](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#clear-gradients) - ```python paddle.nn.Layer.clear_gradients(set_to_zero=True) ``` @@ -15,13 +12,11 @@ paddle.nn.Layer.clear_gradients(set_to_zero=True) PyTorch 的 `Module.zero_grad` 参数与 Paddle 的 `Layer.clear_gradients` 参数用法刚好相反,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | ------------------------------------------------ | | set_to_none | set_to_zero | 设置如何清空梯度,PyTorch 默认 set_to_none 为 True,Paddle 默认 set_to_zero 为 True,两者功能刚好相反,Paddle 需设置为 False。 | ### 转写示例 - ```python # PyTorch 写法 torch.nn.Module.zero_grad(set_to_none=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.RNN.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.RNN.md index c8bd9a3fe9c..1d1633f031e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.RNN.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.RNN.md @@ -20,7 +20,6 @@ paddle.nn.SimpleRNN(input_size, hidden_size, num_layers=1, activation='tanh', di 两者功能一致但参数不一致,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input_size | input_size | 表示输入 x 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.SyncBatchNorm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.SyncBatchNorm.md index 9b6252e045b..ebd5bbe3c5b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.SyncBatchNorm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.SyncBatchNorm.md @@ -1,19 +1,16 @@ ## [ 输入参数用法不一致 ]torch.nn.SyncBatchNorm ### [torch.nn.SyncBatchNorm](https://pytorch.org/docs/stable/generated/torch.nn.SyncBatchNorm.html#torch.nn.SyncBatchNorm) - ```python torch.nn.SyncBatchNorm(num_features, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, process_group=None, device=None, dtype=None) ``` ### [paddle.nn.SyncBatchNorm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/SyncBatchNorm_cn.html#syncbatchnorm) - ```python paddle.nn.SyncBatchNorm(num_features, epsilon=1e-5, momentum=0.9, weight_attr=None, bias_attr=None, data_format='NCHW', name=None) ``` 两者功能一致但参数不一致,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | num_features | num_features | 表示输入 Tensor 通道数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool1d.md index e04ba1ea15e..56770d55656 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool1d.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.functional.avg_pool1d - ### [torch.nn.functional.avg_pool1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.avg_pool1d.html#torch.nn.functional.avg_pool1d) - ```python torch.nn.functional.avg_pool1d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True) ``` @@ -14,7 +12,6 @@ paddle.nn.functional.avg_pool1d(x, kernel_size, stride=None, padding=0, exclusiv 其中 PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool2d.md index e3022e3a418..2b4c797894c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool2d.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.functional.avg_pool2d - ### [torch.nn.functional.avg_pool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.avg_pool2d.html#torch.nn.functional.avg_pool2d) - ```python torch.nn.functional.avg_pool2d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True, divisor_override=None) ``` @@ -13,7 +11,6 @@ paddle.nn.functional.avg_pool2d(x, kernel_size, stride=None, padding=0, ceil_mod 其中 PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool3d.md index 112705e8400..92dd139ab37 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.avg_pool3d.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.functional.avg_pool3d - ### [torch.nn.functional.avg_pool3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.avg_pool3d.html#torch.nn.functional.avg_pool3d) - ```python torch.nn.functional.avg_pool3d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True, divisor_override=None) ``` @@ -13,7 +11,6 @@ paddle.nn.functional.avg_pool3d(x, kernel_size, stride=None, padding=0, ceil_mod 其中 PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.batch_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.batch_norm.md index 762289c914a..50e5349bcf6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.batch_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.batch_norm.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.functional.batch_norm - ### [torch.nn.functional.batch_norm](https://pytorch.org/docs/stable/generated/torch.nn.functional.batch_norm.html#torch.nn.functional.batch_norm) - ```python torch.nn.functional.batch_norm(input, running_mean, running_var, weight=None, bias=None, training=False, momentum=0.1, eps=1e-05) ``` @@ -13,7 +11,6 @@ paddle.nn.functional.batch_norm(x, running_mean, running_var, weight, bias, trai 其中 PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.bilinear.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.bilinear.md index 80d4b100792..ee0fdea9a95 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.bilinear.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.bilinear.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.functional.bilinear - ### [torch.nn.functional.bilinear](https://pytorch.org/docs/stable/generated/torch.nn.functional.bilinear.html?highlight=bilinear#torch.nn.functional.bilinear) - ```python torch.nn.functional.bilinear(input1, input2, @@ -10,7 +8,6 @@ torch.nn.functional.bilinear(input1, ``` ### [paddle.nn.functional.bilinear](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/bilinear_cn.html) - ```python paddle.nn.functional.bilinear(x1, x2, @@ -21,7 +18,6 @@ paddle.nn.functional.bilinear(x1, 两者功能一致,参数 `bias` 的 `shape` 不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input1 | x1 | 表示第一个输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.instance_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.instance_norm.md index 9300661736c..c5296ccb047 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.instance_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.instance_norm.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.functional.instance_norm - ### [torch.nn.functional.instance_norm](https://pytorch.org/docs/stable/generated/torch.nn.functional.instance_norm.html#torch.nn.functional.instance_norm) - ```python torch.nn.functional.instance_norm(input, running_mean=None, running_var=None, weight=None, bias=None, use_input_stats=True, momentum=0.1, eps=1e-05) ``` @@ -13,7 +11,6 @@ paddle.nn.functional.instance_norm(x, running_mean=None, running_var=None, weigh 其中 PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.linear.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.linear.md index f674090bf19..60703656e2d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.linear.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.nn.functional.linear.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.nn.functional.linear - ### [torch.nn.functional.linear](https://pytorch.org/docs/stable/generated/torch.nn.functional.linear.html?highlight=linear#torch.nn.functional.linear) - ```python torch.nn.functional.linear(input, weight, @@ -9,7 +7,6 @@ torch.nn.functional.linear(input, ``` ### [paddle.nn.functional.linear](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/linear_cn.html) - ```python paddle.nn.functional.linear(x, weight, @@ -19,7 +16,6 @@ paddle.nn.functional.linear(x, 两者功能一致,`weight` 参数的 `shape` 不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.optim.Optimizer.zero_grad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.optim.Optimizer.zero_grad.md index 4811ba85966..aceae4613c8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.optim.Optimizer.zero_grad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.optim.Optimizer.zero_grad.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.optim.Optimizer.zero_grad - ### [torch.optim.Optimizer.zero_grad](https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.zero_grad.html) - ```python torch.optim.Optimizer.zero_grad(set_to_none=True) ``` ### [paddle.optimizer.Optimizer.clear_gradients](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Optimizer_cn.html#clear-grad) - ```python paddle.optimizer.Optimizer.clear_gradients(set_to_zero=True) ``` @@ -15,13 +12,11 @@ paddle.optimizer.Optimizer.clear_gradients(set_to_zero=True) PyTorch 的 `Optimizer.zero_grad` 参数与 Paddle 的 `Optimizer.clear_gradients` 参数用法刚好相反,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | ------------------------------------------------ | | set_to_none | set_to_zero | 设置如何清空梯度,PyTorch 默认 set_to_none 为 True,Paddle 默认 set_to_zero 为 True,两者功能刚好相反,Paddle 需设置为 False。 | ### 转写示例 - ```python # PyTorch 写法 torch.optim.Optimizer.zero_grad(set_to_none=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.rand.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.rand.md index e753016d02e..a753c23fa3d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.rand.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.rand.md @@ -1,7 +1,5 @@ ## [ 输入参数用法不一致 ]torch.rand - ### [torch.rand](https://pytorch.org/docs/stable/generated/torch.rand.html?highlight=rand#torch.rand) - ```python torch.rand(*size, *, @@ -15,7 +13,6 @@ torch.rand(*size, ``` ### [paddle.rand](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/rand_cn.html#rand) - ```python paddle.rand(shape, dtype=None, @@ -24,7 +21,6 @@ paddle.rand(shape, 其中 torch 的 `size` 和 paddle 的 `shape` 用法不一致,torch 还支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | *size | shape | 表示输出形状大小,PyTorch 以可变参数方式传入,Paddle 以 list 或 tuple 的方式传入。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.set_rng_state.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.set_rng_state.md index a4de1010bb4..9b2c6e0feb9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.set_rng_state.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.set_rng_state.md @@ -1,13 +1,10 @@ -## [ 输入参数用法不一致 ] torch.set_rng_state - +## [ 输入参数用法不一致 ]torch.set_rng_state ### [torch.set_rng_state](https://pytorch.org/docs/stable/generated/torch.set_rng_state.html#torch.set_rng_state) - ```python torch.set_rng_state(new_state) ``` ### [paddle.set_rng_state]() - ```python paddle.set_rng_state(state_list) ``` @@ -15,7 +12,6 @@ paddle.set_rng_state(state_list) 其中 PyTorch 与 Paddle 的输入参数类型不一致 ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | new_state | state_list | 表示需要设置的新状态,PyTorch 输入类型为 torch.ByteTensor, Paddle 为 list[GeneratorState] | @@ -23,7 +19,6 @@ paddle.set_rng_state(state_list) ### 转写示例 - #### new_state: 指定输入 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.slice_scatter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.slice_scatter.md index b4a3c26b1e1..564283a7faf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.slice_scatter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.slice_scatter.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.slice_scatter - ### [torch.slice_scatter](https://pytorch.org/docs/stable/generated/torch.slice_scatter.html#torch.slice_scatter) - ```python torch.slice_scatter(input, src, dim=0, start=None, end=None, step=1) ``` ### [paddle.slice_scatter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/slice_scatter.html) - ```python paddle.slice_scatter(x, value, axes, starts, ends, strides, name=None) ``` @@ -15,7 +12,6 @@ paddle.slice_scatter(x, value, axes, starts, ends, strides, name=None) 两者功能一致,参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的目标矩阵, 仅参数名不一致。 | @@ -26,7 +22,6 @@ paddle.slice_scatter(x, value, axes, starts, ends, strides, name=None) | step | strides | 嵌入步长,PyTorch 为 int 类型,Paddle 为 list of int。 | ### 转写示例 - ```python # PyTorch 写法 torch.slice_scatter(input, src, dim=0, start=1, end=5, step=2) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.sparse.FloatTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.sparse.FloatTensor.md index dfda2738991..70e15a758c6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.sparse.FloatTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.sparse.FloatTensor.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.sparse.FloatTensor - ### [torch.sparse.FloatTensor](https://pytorch.org/docs/stable/generated/torch.cuda.comm.broadcast.html#torch.cuda.comm.broadcast) - ```python torch.sparse.FloatTensor(indices, values, size, *, device=None) ``` ### [paddle.sparse.sparse_coo_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sparse/sparse_coo_tensor_cn.html#sparse-coo-tensor) - ```python paddle.sparse.sparse_coo_tensor(indices, values, shape=None, dtype=None, place=None, stop_gradient=True) ``` @@ -15,7 +12,6 @@ paddle.sparse.sparse_coo_tensor(indices, values, shape=None, dtype=None, place=N 其中 PyTorch 与 Paddle 参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------ | | indices | indices | 初始化 tensor 的数据。 | @@ -25,9 +21,7 @@ paddle.sparse.sparse_coo_tensor(indices, values, shape=None, dtype=None, place=N | - | dtype | 创建 tensor 的数据类型。PyTorch 无此参数,Paddle 保持默认即可。 | | - | stop_gradient | 是否阻断 Autograd 的梯度传导。PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### device:输出数据类型 - ```python # PyTorch 写法 torch.sparse.FloatTensor(i, v, torch.Size([2, 3]), device='cpu') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.sparse_coo_tensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.sparse_coo_tensor.md index e1fba494a5b..aeda69f4846 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.sparse_coo_tensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.sparse_coo_tensor.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.sparse_coo_tensor - ### [torch.sparse_coo_tensor](https://pytorch.org/docs/stable/generated/torch.sparse_coo_tensor.html?highlight=torch+sparse_coo_tensor#torch.sparse_coo_tensor) - ```python torch.sparse_coo_tensor(indices,values,size=None, * , dtype=None, device=None, requires_grad=False, check_invariants=None) ``` ### [paddle.sparse.sparse_coo_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sparse/sparse_coo_tensor_cn.html#sparse-coo-tensor) - ```python paddle.sparse.sparse_coo_tensor(indices, values, shape=None, dtype=None, place=None, stop_gradient=True) ``` @@ -15,7 +12,6 @@ paddle.sparse.sparse_coo_tensor(indices, values, shape=None, dtype=None, place=N PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ----------- | ----------------------------------------- | | indices | indices | 表示初始化 tensor 的数据。 | @@ -27,7 +23,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | check_invariants | - | 是否检查稀疏 Tensor 变量,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - ```python # PyTorch 写法 import torch diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.split.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.split.md index 9b864c978e8..b47a09f5176 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.split.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.split.md @@ -1,6 +1,5 @@ ## [ 输入参数用法不一致 ]torch.split ### [torch.split](https://pytorch.org/docs/stable/generated/torch.split.html?highlight=torch%20split#torch.split) - ```python torch.split(tensor, split_size_or_sections, @@ -8,7 +7,6 @@ torch.split(tensor, ``` ### [paddle.split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/split_cn.html#split) - ```python paddle.split(x, num_or_sections, @@ -18,7 +16,6 @@ paddle.split(x, 其中 PyTorch 的 `split_size_or_sections` 与 Paddle 的 `num_or_sections` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensor | x | 表示输入 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.utils.data.TensorDataset.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.utils.data.TensorDataset.md index 7c350d32363..cfb3a914efe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.utils.data.TensorDataset.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torch.utils.data.TensorDataset.md @@ -1,13 +1,10 @@ ## [ 输入参数用法不一致 ]torch.utils.data.TensorDataset - ### [torch.utils.data.TensorDataset](https://pytorch.org/docs/stable/data.html#torch.utils.data.TensorDataset) - ```python torch.utils.data.TensorDataset(*tensors) ``` ### [paddle.io.TensorDataset](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/TensorDataset_cn.html) - ```python paddle.io.TensorDataset(tensors) ``` @@ -15,15 +12,12 @@ paddle.io.TensorDataset(tensors) paddle 参数和 torch 参数用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |----------|--------------|------------------------------------------------| | *tensors | tensors | 输入的 Tensor, PyTorch 是可变参数用法, Paddle 是列表或元组,需要转写 | ### 转写示例 - #### tensors:输入的 Tensor - ```python # PyTorch 写法 torch.utils.data.TensorDataset(tensor1, tensor2, tensor3) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.CIFAR10.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.CIFAR10.md index d2a10456247..b9e776d138f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.CIFAR10.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.CIFAR10.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.datasets.CIFAR10 - +## [ 输入参数用法不一致 ]torchvision.datasets.CIFAR10 ### [torchvision.datasets.CIFAR10](https://pytorch.org/vision/main/generated/torchvision.datasets.CIFAR10.html) - ```python torchvision.datasets.CIFAR10(root: Union[str, Path], train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False) ``` ### [paddle.vision.datasets.Cifar10](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/datasets/Cifar10_cn.html) - ```python paddle.vision.datasets.Cifar10(data_file: Optional[str] = None, mode: str = 'train', transform: Optional[Callable] = None, download: bool = True, backend: Optional[str] = None) ``` @@ -15,7 +12,6 @@ paddle.vision.datasets.Cifar10(data_file: Optional[str] = None, mode: str = 'tra 两者功能一致,指定数据集文件路径的参数 `root` 与指定训练集的参数 `train` 的用法不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ---------------------- | --------------------- | ---------------------------------------------------------- | | root | data_file | 数据集文件路径,Paddle 参数 data_file 需含完整的文件名,如 PyTorch 参数 `/path/to/data`,对应 Paddle 参数 `/path/to/data/cifar-10-python.tar.gz`,需要转写。 | @@ -35,8 +31,7 @@ train_dataset = torchvision.datasets.CIFAR10(root='/path/to/data', train=True) train_dataset = paddle.vision.datasets.Cifar10(data_file='/path/to/data/cifar-10-python.tar.gz', mode='train') ``` -#### train: 训练集或数据集 -训练集 +#### train: 训练集或数据集训练集 ```python # PyTorch 写法 train_dataset = torchvision.datasets.CIFAR10(root='/path/to/data', train=True, download=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.CIFAR100.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.CIFAR100.md index 1a7d9c268bc..d427b3229a8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.CIFAR100.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.CIFAR100.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.datasets.CIFAR100 - +## [ 输入参数用法不一致 ]torchvision.datasets.CIFAR100 ### [torchvision.datasets.CIFAR100](https://pytorch.org/vision/main/generated/torchvision.datasets.CIFAR100.html) - ```python torchvision.datasets.CIFAR100(root: Union[str, Path], train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False) ``` ### [paddle.vision.datasets.Cifar100](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/datasets/Cifar100_cn.html) - ```python paddle.vision.datasets.Cifar100(data_file: Optional[str] = None, mode: str = 'train', transform: Optional[Callable] = None, download: bool = True, backend: Optional[str] = None) ``` @@ -15,7 +12,6 @@ paddle.vision.datasets.Cifar100(data_file: Optional[str] = None, mode: str = 'tr 两者功能一致,指定数据集文件路径的参数 `root` 与指定训练集的参数 `train` 的用法不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ---------------------- | --------------------- | ---------------------------------------------------------- | | root | data_file | 数据集文件路径,Paddle 参数 data_file 需含完整的文件名,如 PyTorch 参数 `/path/to/data`,对应 Paddle 参数 `/path/to/data/cifar-100-python.tar.gz`,需要转写。 | @@ -35,8 +31,7 @@ train_dataset = torchvision.datasets.CIFAR100(root='/path/to/data', train=True) train_dataset = paddle.vision.datasets.Cifar100(data_file='/path/to/data/cifar-100-python.tar.gz', mode='train') ``` -#### train: 训练集或数据集 -训练集 +#### train: 训练集或数据集训练集 ```python # PyTorch 写法 train_dataset = torchvision.datasets.CIFAR100(root='/path/to/data', train=True, download=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.FashionMNIST.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.FashionMNIST.md index 4f7e3b77020..6e7e78854ac 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.FashionMNIST.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.FashionMNIST.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.datasets.FashionMNIST - +## [ 输入参数用法不一致 ]torchvision.datasets.FashionMNIST ### [torchvision.datasets.FashionMNIST](https://pytorch.org/vision/main/generated/torchvision.datasets.FashionMNIST.html) - ```python torchvision.datasets.FashionMNIST(root: Union[str, Path], train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False) ``` ### [paddle.vision.datasets.FashionMNIST](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/datasets/FashionMNIST_cn.html) - ```python paddle.vision.datasets.FashionMNIST(image_path: str = None, label_path: str = None, mode: str = 'train', transform: Callable = None, download: bool = True, backend: str = None) ``` @@ -15,7 +12,6 @@ paddle.vision.datasets.FashionMNIST(image_path: str = None, label_path: str = No 两者功能一致,指定数据集文件路径的参数 `root` 与指定训练集的参数 `train` 的用法不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | -------------------------------- | ---------------------------------- | ---- | | root | image_path, label_path| 指定数据集目录,Paddle 使用 image_path 和 label_path,等价的实现 PyTorch 的 root 的功能,需要转写。| @@ -37,8 +33,7 @@ train_dataset = paddle.vision.datasets.FashionMNIST( label_path='./data/FashionMNIST/raw/train-labels-idx1-ubyte.gz') ``` -#### train: 训练集或数据集 -训练集 +#### train: 训练集或数据集训练集 ```python # PyTorch 写法 train_dataset = torchvision.datasets.FashionMNIST(root='./data', train=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.Flowers102.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.Flowers102.md index 08435a4bf3e..7ee8104e2ba 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.Flowers102.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.Flowers102.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.datasets.Flowers102 - +## [ 输入参数用法不一致 ]torchvision.datasets.Flowers102 ### [torchvision.datasets.Flowers102](https://pytorch.org/vision/main/generated/torchvision.datasets.Flowers102.html) - ```python torchvision.datasets.Flowers102(root: Union[str, Path], split: str = 'train', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False) ``` ### [paddle.vision.datasets.Flowers](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/datasets/Flowers_cn.html) - ```python paddle.vision.datasets.Flowers(data_file=None, label_file=None, setid_file=None, mode='train', transform=None, download=True, backend=None) ``` @@ -15,7 +12,6 @@ paddle.vision.datasets.Flowers(data_file=None, label_file=None, setid_file=None, 两者功能一致,指定数据集文件路径的参数 `root` 与指定训练集的参数 `split` 的用法不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ---------------------- | --------------------- | ---------------------------------------------------------- | | root | data_file, label_file, setid_file| 指定数据集目录,Paddle 使用 data_file、label_file 和 setid_file,等价的实现 PyTorch 的 root 的功能,需要转写。 | @@ -35,8 +31,7 @@ train_dataset = torchvision.datasets.Flowers102(root='./data', split='train') train_dataset = paddle.vision.datasets.Flowers(data_file='./data/flowers-102/102flowers.tgz', label_file='./data/flowers-102/imagelabels.mat', setid_file='./data/flowers-102/setid.mat', mode='train') ``` -#### split: 训练集或数据集 -验证集 +#### split: 训练集或数据集验证集 ```python # PyTorch 写法 train_dataset = torchvision.datasets.Flowers102(root='./data', split='val') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.MNIST.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.MNIST.md index 649d4e3f1ef..352bb42cc3e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.MNIST.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.MNIST.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.datasets.MNIST - +## [ 输入参数用法不一致 ]torchvision.datasets.MNIST ### [torchvision.datasets.MNIST](https://pytorch.org/vision/main/generated/torchvision.datasets.MNIST.html) - ```python torchvision.datasets.MNIST(root: Union[str, Path], train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False) ``` ### [paddle.vision.datasets.MNIST](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/datasets/MNIST_cn.html) - ```python paddle.vision.datasets.MNIST(image_path: str = None, label_path: str = None, mode: str = 'train', transform: Callable = None, download: bool = True, backend: str = None) ``` @@ -15,7 +12,6 @@ paddle.vision.datasets.MNIST(image_path: str = None, label_path: str = None, mod 两者功能一致,指定数据集文件路径的参数 `root` 与指定训练集的参数 `train` 的用法不一致,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | -------------------------------- | ---------------------------------- | ---- | | root | image_path, label_path| 指定数据集目录,Paddle 使用 image_path 和 label_path,等价的实现 PyTorch 的 root 的功能,需要转写。| @@ -37,8 +33,7 @@ train_dataset = paddle.vision.datasets.MNIST( label_path='./data/MNIST/raw/train-labels-idx1-ubyte.gz') ``` -#### train: 训练集或数据集 -训练集 +#### train: 训练集或数据集训练集 ```python # PyTorch 写法 train_dataset = torchvision.datasets.MNIST(root='./data', train=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.VOCDetection.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.VOCDetection.md index fccb4a12419..d51cf0190d6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.VOCDetection.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.datasets.VOCDetection.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.datasets.VOCDetection - +## [ 输入参数用法不一致 ]torchvision.datasets.VOCDetection ### [torchvision.datasets.VOCDetection](https://pytorch.org/vision/main/generated/torchvision.datasets.VOCDetection.html) - ```python torchvision.datasets.VOCDetection(root: Union[str, Path], year: str = '2012', image_set: str = 'train', download: bool = False, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, transforms: Optional[Callable] = None) ``` ### [paddle.vision.datasets.VOC2012](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/datasets/VOC2012_cn.html) - ```python paddle.vision.datasets.VOC2012(data_file: Optional[str] = None, mode: str = 'train', transform: Optional[Callable] = None, download: bool = True, backend: Optional[str] = None) ``` @@ -15,7 +12,6 @@ paddle.vision.datasets.VOC2012(data_file: Optional[str] = None, mode: str = 'tra 指定数据集文件路径的参数 `root` 与指定训练集的参数 `image_set` 的用法不一致,Paddle 只支持 2012 年数据集,但 PyTorch 支持 2007 和 2012 年数据集,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ---------------------- | --------------------- | ---------------------------------------------------------- | | root | data_file | 数据集文件路径,Paddle 参数 data_file 需含完整的文件名,如 PyTorch 参数 `./data`,对应 Paddle 参数 `./data/voc2012/VOCtrainval_11-May-2012.tar`,需要转写。 | @@ -37,8 +33,7 @@ train_dataset = torchvision.datasets.VOCDetection(root='./data', image_set='trai train_dataset = paddle.vision.datasets.VOC2012(data_file='./data/voc2012/VOCtrainval_11-May-2012.tar', mode='train') ``` -#### image_set: 数据集 -数据集 imaget_set 为 'trainval' +#### image_set: 数据集数据集 imaget_set 为 'trainval' ```python # PyTorch 写法 train_dataset = torchvision.datasets.VOCDetection(root='./data', image_set='trainval') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.ps_roi_pool.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.ps_roi_pool.md index 48441fef21c..e3f4a3a5297 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.ps_roi_pool.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.ps_roi_pool.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.ops.ps_roi_pool - +## [ 输入参数用法不一致 ]torchvision.ops.ps_roi_pool ### [torchvision.ops.ps_roi_pool](https://pytorch.org/vision/main/generated/torchvision.ops.ps_roi_pool.html) - ```python torchvision.ops.ps_roi_pool(input: Tensor, boxes: Tensor, output_size: int, spatial_scale: float = 1.0) ``` ### [paddle.vision.ops.psroi_pool](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/ops/psroi_pool_cn.html) - ```python paddle.vision.ops.psroi_pool(x, boxes, boxes_num, output_size, spatial_scale=1.0, name=None) ``` @@ -29,7 +26,6 @@ paddle.vision.ops.psroi_pool(x, boxes, boxes_num, output_size, spatial_scale=1.0 2. boxes_num: 一个形状为 (batch_size) 的 Tensor,用于指定每个样本中包含的 ROI 数量。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------------------------- | ------------------ | -------- | | input | x | 输入特征图,仅参数名不一致。| @@ -38,8 +34,7 @@ paddle.vision.ops.psroi_pool(x, boxes, boxes_num, output_size, spatial_scale=1.0 | spatial_scale | spatial_scale | 空间比例因子。| ### 转写示例 -#### boxes:待执行池化的 ROIs 的框坐标 -boxes 是一个形状为 (K, 5) 的二维 Tensor 时 +#### boxes:待执行池化的 ROIs 的框坐标 boxes 是一个形状为 (K, 5) 的二维 Tensor 时 ```python # PyTorch 写法 boxes = torch.tensor([[0, 4, 4, 7, 7], [1, 5, 5, 10, 10]], dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.roi_align.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.roi_align.md index 2f4c6c9bb72..31865188fa7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.roi_align.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.roi_align.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.ops.roi_align - +## [ 输入参数用法不一致 ]torchvision.ops.roi_align ### [torchvision.ops.roi_align](https://pytorch.org/vision/main/generated/torchvision.ops.roi_align.html) - ```python torchvision.ops.roi_align(input: Tensor, boxes: Union[Tensor, List[Tensor]], output_size: None, spatial_scale: float = 1.0, sampling_ratio: int = - 1, aligned: bool = False) ``` ### [paddle.vision.ops.roi_align](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/ops/roi_align_cn.html) - ```python paddle.vision.ops.roi_align(x, boxes, boxes_num, output_size, spatial_scale=1.0, sampling_ratio=- 1, aligned=True, name=None) ``` @@ -29,7 +26,6 @@ paddle.vision.ops.roi_align(x, boxes, boxes_num, output_size, spatial_scale=1.0, 2. boxes_num: 一个形状为 (batch_size) 的 Tensor,用于指定每个样本中包含的 ROI 数量。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------------------------- | ------------------ | -------- | | input | x | 输入特征图,仅参数名不一致。| @@ -40,8 +36,7 @@ paddle.vision.ops.roi_align(x, boxes, boxes_num, output_size, spatial_scale=1.0, | aligned | aligned | 像素移动框是否将其坐标移动-0.5。| ### 转写示例 -#### boxes:待执行池化的 ROIs 的框坐标 -boxes 是一个形状为 (K, 5) 的二维 Tensor 时 +#### boxes:待执行池化的 ROIs 的框坐标 boxes 是一个形状为 (K, 5) 的二维 Tensor 时 ```python # PyTorch 写法 boxes = torch.tensor([[0, 4, 4, 7, 7], [1, 5, 5, 10, 10]], dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.roi_pool.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.roi_pool.md index 76fb20df0da..7428bd2a670 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.roi_pool.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/input_args_usage_diff/torchvision.ops.roi_pool.md @@ -1,13 +1,10 @@ -## [输入参数用法不一致]torchvision.ops.roi_pool - +## [ 输入参数用法不一致 ]torchvision.ops.roi_pool ### [torchvision.ops.roi_pool](https://pytorch.org/vision/main/generated/torchvision.ops.roi_pool.html) - ```python torchvision.ops.roi_pool(input: Tensor, boxes: Union[Tensor, List[Tensor]], output_size: None, spatial_scale: float = 1.0) ``` ### [paddle.vision.ops.roi_pool](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/ops/roi_pool_cn.html) - ```python paddle.vision.ops.roi_pool(x, boxes, boxes_num, output_size, spatial_scale=1.0, name=None) ``` @@ -29,7 +26,6 @@ paddle.vision.ops.roi_pool(x, boxes, boxes_num, output_size, spatial_scale=1.0, 2. boxes_num: 一个形状为 (batch_size) 的 Tensor,用于指定每个样本中包含的 ROI 数量。 ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------------------------- | ------------------ | -------- | | input | x | 输入特征图,仅参数名不一致。| @@ -38,8 +34,7 @@ paddle.vision.ops.roi_pool(x, boxes, boxes_num, output_size, spatial_scale=1.0, | spatial_scale | spatial_scale | 空间比例因子。| ### 转写示例 -#### boxes:待执行池化的 ROIs 的框坐标 -boxes 是一个形状为 (K, 5) 的二维 Tensor 时 +#### boxes:待执行池化的 ROIs 的框坐标 boxes 是一个形状为 (K, 5) 的二维 Tensor 时 ```python # PyTorch 写法 boxes = torch.tensor([[0, 4, 4, 7, 7], [1, 5, 5, 10, 10]], dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_rank.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_rank.md index 5e943c6b2fa..a4e7e1a9d81 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_rank.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_rank.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]fairscale.nn.model_parallel.initialize.get_model_parallel_rank - +## [ 仅 API 调用方式不一致 ]fairscale.nn.model_parallel.initialize.get_model_parallel_rank ### [fairscale.nn.model_parallel.initialize.get_model_parallel_rank](https://github.com/facebookresearch/fairscale/blob/164cc0f3170b4a3951dd84dda29c3e1504ac4d6e/fairscale/nn/model_parallel/initialize.py#L155) - ```python fairscale.nn.model_parallel.initialize.get_model_parallel_rank() ``` ### [paddle.distributed.fleet.base.topology._HYBRID_PARALLEL_GROUP.get_model_parallel_rank](https://github.com/PaddlePaddle/Paddle/blob/ddac1b431483ddc0f1ee600e799aa31fc0a75961/python/paddle/distributed/fleet/base/topology.py#L463) - ```python paddle.distributed.fleet.base.topology._HYBRID_PARALLEL_GROUP.get_model_parallel_rank() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_world_size.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_world_size.md index cc023571827..f7e77ed3b12 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_world_size.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/fairscale.nn.model_parallel.initialize.get_model_parallel_world_size.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]fairscale.nn.model_parallel.initialize.get_model_parallel_world_size - +## [ 仅 API 调用方式不一致 ]fairscale.nn.model_parallel.initialize.get_model_parallel_world_size ### [fairscale.nn.model_parallel.initialize.get_model_parallel_world_size](https://github.com/facebookresearch/fairscale/blob/164cc0f3170b4a3951dd84dda29c3e1504ac4d6e/fairscale/nn/model_parallel/initialize.py#L150) - ```python fairscale.nn.model_parallel.initialize.get_model_parallel_world_size() ``` ### [paddle.distributed.fleet.base.topology._HYBRID_PARALLEL_GROUP._mp_degree](https://github.com/PaddlePaddle/Paddle/blob/ddac1b431483ddc0f1ee600e799aa31fc0a75961/python/paddle/distributed/fleet/base/topology.py#L185) - ```python paddle.distributed.fleet.base.topology._HYBRID_PARALLEL_GROUP._mp_degree ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/flash_attn.__version__.split.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/flash_attn.__version__.split.md index 2c01cc7e271..4864b6a4514 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/flash_attn.__version__.split.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/flash_attn.__version__.split.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] flash_attn._\_version__.split - +## [ 仅 API 调用方式不一致 ]flash_attn._\_version__.split ### [flash_attn._\_version__.split](https://github.com/Dao-AILab/flash-attention/blob/72e27c6320555a37a83338178caa25a388e46121/flash_attn/__init__.py) - ```python flash_attn.__version__.split(sep=None, maxsplit=-1) ``` ### [paddle._\_version__.split](https://github.com/PaddlePaddle/Paddle/tree/develop) - ```python paddle.__version__.split(sep=None, maxsplit=-1) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.clamp_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.clamp_.md index 5d5216052af..d0194099d89 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.clamp_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.clamp_.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.clamp_ - +## [ 仅 API 调用方式不一致 ]torch.Tensor.clamp_ ### [torch.Tensor.clamp_](https://pytorch.org/docs/stable/generated/torch.Tensor.clamp_.html?highlight=clamp_#torch.Tensor.clamp_) - ```python torch.Tensor.clamp_(min=None, max=None) ``` ### [paddle.Tensor.clip_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#id6) - ```python paddle.Tensor.clip_(min=None, max=None, name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.col_indices.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.col_indices.md index 1d5be70c90a..18d95da9805 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.col_indices.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.col_indices.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.col_indices - +## [ 仅 API 调用方式不一致 ]torch.Tensor.col_indices ### [torch.Tensor.col_indices](https://pytorch.org/docs/stable/generated/torch.Tensor.col_indices.html) - ```python torch.Tensor.col_indices() ``` ### [paddle.Tensor.cols]() - ```python paddle.Tensor.cols() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.conj_physical.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.conj_physical.md index f8e0ae30618..0012606562e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.conj_physical.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.conj_physical.md @@ -1,12 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.conj_physical +## [ 仅 API 调用方式不一致 ]torch.Tensor.conj_physical ### [torch.Tensor.conj_physical](https://pytorch.org/docs/stable/generated/torch.Tensor.conj_physical.html#torch.Tensor.conj_physical) - ```python torch.Tensor.conj_physical() ``` ### [paddle.Tensor.conj](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#conj-name-none) - ```python paddle.Tensor.conj(name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.crow_indices.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.crow_indices.md index 062224183a7..8fae880836d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.crow_indices.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.crow_indices.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.crow_indices - +## [ 仅 API 调用方式不一致 ]torch.Tensor.crow_indices ### [torch.Tensor.crow_indices](https://pytorch.org/docs/stable/generated/torch.Tensor.crow_indices.html) - ```python torch.Tensor.crow_indices() ``` ### [paddle.Tensor.crows]() - ```python paddle.Tensor.crows() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.det.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.det.md index 1f3a00ae21e..af2ea21c9f7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.det.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.det.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.det - +## [ 仅 API 调用方式不一致 ]torch.Tensor.det ### [torch.Tensor.det](https://pytorch.org/docs/stable/generated/torch.Tensor.det.html?highlight=det#torch.Tensor.det) - ```python torch.Tensor.det() ``` ### [paddle.linalg.det](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/det_cn.html#det) - ```python paddle.linalg.det(x, name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.device.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.device.md index 95bc6cff169..0d6a778b9c9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.device.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.device.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.device - +## [ 仅 API 调用方式不一致 ]torch.Tensor.device ### [torch.Tensor.device](https://pytorch.org/docs/stable/generated/torch.Tensor.device.html) - ```python torch.Tensor.device ``` ### [paddle.Tensor.place](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#place) - ```python paddle.Tensor.place ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.erf_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.erf_.md index 0c04d3bad78..2522212c24f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.erf_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.erf_.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.erf_ - +## [ 仅 API 调用方式不一致 ]torch.Tensor.erf_ ### [torch.Tensor.erf_](https://pytorch.org/docs/stable/generated/torch.Tensor.erf_.html) - ```python torch.Tensor.erf_() ``` ### [paddle.erf_]() - ```python paddle.erf_(x) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.expm1_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.expm1_.md index 7db4ea74328..bbb1b16a69b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.expm1_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.expm1_.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.expm1_ - +## [ 仅 API 调用方式不一致 ]torch.Tensor.expm1_ ### [torch.Tensor.expm1_](https://pytorch.org/docs/stable/generated/torch.Tensor.expm1_.html) - ```python torch.Tensor.expm1_() ``` ### [paddle.expm1_]() - ```python paddle.expm1_(x) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.fix.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.fix.md index 12d2d8c61e3..8467e925391 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.fix.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.fix.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.fix - +## [ 仅 API 调用方式不一致 ]torch.Tensor.fix ### [torch.Tensor.fix](https://pytorch.org/docs/stable/generated/torch.Tensor.fix.html?highlight=fix#torch.Tensor.fix) - ```python torch.Tensor.fix() ``` ### [paddle.Tensor.trunc](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#trunc-name-none) - ```python paddle.Tensor.trunc(name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.fix_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.fix_.md index caadc40fab9..319329edbf7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.fix_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.fix_.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.fix_ - +## [ 仅 API 调用方式不一致 ]torch.Tensor.fix_ ### [torch.Tensor.fix_](https://pytorch.org/docs/stable/generated/torch.Tensor.fix_.html) - ```python torch.Tensor.fix_() ``` ### [paddle.Tensor.trunc_]() - ```python paddle.Tensor.trunc_() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.imag.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.imag.md index 6868e966768..4f2715a5bca 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.imag.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.imag.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.imag - +## [ 仅 API 调用方式不一致 ]torch.Tensor.imag ### [torch.Tensor.imag](https://pytorch.org/docs/stable/generated/torch.Tensor.imag.html) - ```python torch.Tensor.imag ``` ### [paddle.Tensor.imag](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#imag-name-none) - ```python paddle.Tensor.imag ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_inference.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_inference.md index e88a1f93b72..ff578646bfd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_inference.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_inference.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.is_inference - +## [ 仅 API 调用方式不一致 ]torch.Tensor.is_inference ### [torch.Tensor.is_inference](https://pytorch.org/docs/stable/generated/torch.Tensor.is_inference.html) - ```python torch.Tensor.is_inference() ``` ### [paddle.Tensor.stop_gradient]() - ```python paddle.Tensor.stop_gradient ``` @@ -15,7 +12,6 @@ paddle.Tensor.stop_gradient 两者功能一致,无参数。 `is_inference` 会强制关闭梯度记录。并且不能在中途设置梯度,而 `stop_gradient` 仅为停止计算该算子梯度,可在中途重新设为 `True` ,`Paddle` 为近似实现。 ### 转写示例 - ```python # PyTorch 写法 x.is_inference() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_sparse.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_sparse.md index 0c8d94f5080..344fa5dc258 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_sparse.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_sparse.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.is_sparse - +## [ 仅 API 调用方式不一致 ]torch.Tensor.is_sparse ### [torch.Tensor.is_sparse](https://pytorch.org/docs/stable/generated/torch.Tensor.is_sparse.html) - ```python torch.Tensor.is_sparse ``` ### [paddle.Tensor.is_sparse](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html) - ```python paddle.Tensor.is_sparse() ``` @@ -15,7 +12,6 @@ paddle.Tensor.is_sparse() 两者功能一致,但使用方式不一致,前者可以直接访问属性,后者需要调用方法,具体如下: ### 转写示例 - ```python # torch 版本可以直接访问属性 # x = torch.rand(3) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_sparse_csr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_sparse_csr.md index ab0d03866f7..a621b5ab2c9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_sparse_csr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.is_sparse_csr.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.is_sparse_csr - +## [ 仅 API 调用方式不一致 ]torch.Tensor.is_sparse_csr ### [torch.Tensor.is_sparse_csr](https://pytorch.org/docs/stable/generated/torch.Tensor.is_sparse_csr.html) - ```python torch.Tensor.is_sparse_csr ``` ### [paddle.Tensor.is_sparse_csr](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html) - ```python paddle.Tensor.is_sparse_csr() ``` @@ -15,7 +12,6 @@ paddle.Tensor.is_sparse_csr() 两者功能一致,但使用方式不一致,前者可以直接访问属性,后者需要调用方法,具体如下: ### 转写示例 - ```python # torch 版本可以直接访问属性 x.is_sparse_csr diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.matrix_exp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.matrix_exp.md index ad3df9bda28..9cd9974b6f9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.matrix_exp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.matrix_exp.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.matrix_exp - +## [ 仅 API 调用方式不一致 ]torch.Tensor.matrix_exp ### [torch.Tensor.matrix_exp](https://pytorch.org/docs/stable/generated/torch.Tensor.matrix_exp.html#torch-tensor-matrix-exp) - ```python torch.Tensor.matrix_exp() ``` ### [paddle.linalg.matrix_exp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/matrix_exp_cn.html) - ```python paddle.linalg.matrix_exp(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.matrix_exp(x, name=None) 两者功能一致,无参数。 ### 转写示例 - ```python # PyTorch 写法 out = x.matrix_exp() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.movedim.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.movedim.md index f20ec3ca767..a2273b00a4d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.movedim.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.movedim.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.movedim - +## [ 仅 API 调用方式不一致 ]torch.Tensor.movedim ### [torch.Tensor.movedim](https://pytorch.org/docs/stable/generated/torch.Tensor.movedim.html) - ```python torch.Tensor.movedim(source, destination) ``` ### [paddle.Tensor.moveaxis](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/moveaxis_cn.html) - ```python paddle.Tensor.moveaxis(source, destination, name = None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.mvlgamma.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.mvlgamma.md index d8b0ea8f735..16785a43b35 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.mvlgamma.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.mvlgamma.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.mvlgamma - +## [ 仅 API 调用方式不一致 ]torch.Tensor.mvlgamma ### [torch.Tensor.mvlgamma](https://pytorch.org/docs/stable/generated/torch.Tensor.mvlgamma.html#torch-tensor-mvlgamma) - ```python torch.Tensor.mvlgamma(p) ``` ### [paddle.Tensor.multigammaln](https://github.com/PaddlePaddle/Paddle/blob/be090bd0bc9ac7a8595296c316b3a6ed3dc60ba6/python/paddle/tensor/math.py#L5099) - ```python paddle.Tensor.multigammaln(p, name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.mvlgamma_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.mvlgamma_.md index c800984840d..420cb3624c6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.mvlgamma_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.mvlgamma_.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.mvlgamma_ - +## [ 仅 API 调用方式不一致 ]torch.Tensor.mvlgamma_ ### [torch.Tensor.mvlgamma_](https://pytorch.org/docs/stable/generated/torch.Tensor.mvlgamma_.html#torch-tensor-mvlgamma) - ```python torch.Tensor.mvlgamma_(p) ``` ### [paddle.Tensor.multigammaln_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/multigammaln__cn.html#multigammaln) - ```python paddle.Tensor.multigammaln_(p, name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.negative.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.negative.md index 094405463ed..7b70d7a3760 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.negative.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.negative.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.negative - +## [ 仅 API 调用方式不一致 ]torch.Tensor.negative ### [torch.Tensor.negative](https://pytorch.org/docs/stable/generated/torch.negative.html#torch.negative) - ```python torch.Tensor.negative() ``` ### [paddle.Tensor.neg](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/neg_cn.html#cn-api-paddle-neg) - ```python paddle.Tensor.neg() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.negative_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.negative_.md index 8c88cec189e..c294b75b952 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.negative_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.negative_.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.negative_ - +## [ 仅 API 调用方式不一致 ]torch.Tensor.negative_ ### [torch.Tensor.negative_](https://pytorch.org/docs/stable/generated/torch.Tensor.negative_.html) - ```python torch.Tensor.negative_() ``` ### [paddle.Tensor.neg_]() - ```python paddle.Tensor.neg_() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.nelement.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.nelement.md index 4cb2cbd93a4..5525ed9db9f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.nelement.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.nelement.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.nelement - +## [ 仅 API 调用方式不一致 ]torch.Tensor.nelement ### [torch.Tensor.nelement](https://pytorch.org/docs/stable/generated/torch.Tensor.nelement.html?highlight=nelement#torch.Tensor.nelement) - ```python torch.Tensor.nelement() ``` ### [paddle.Tensor.size](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fluid/layers/size_cn.html#cn-api-fluid-layers-size) - ```python paddle.Tensor.size() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.numel.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.numel.md index 56d7d867b72..59e977371d9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.numel.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.numel.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.numel - +## [ 仅 API 调用方式不一致 ]torch.Tensor.numel ### [torch.Tensor.numel](https://pytorch.org/docs/stable/generated/torch.numel.html?highlight=numel#torch.numel) - ```python torch.Tensor.numel() ``` ### [paddle.Tensor.size](https://www.paddlepaddle.org.cn/documentation/docs/guides/beginner/tensor_cn.html#tensor-shape) - ```python paddle.Tensor.size ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.positive.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.positive.md index e475cb2a2b9..1ca198147d5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.positive.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.positive.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.positive - +## [ 仅 API 调用方式不一致 ]torch.Tensor.positive ### [torch.Tensor.positive](https://pytorch.org/docs/stable/generated/torch.Tensor.positive.html#torch.Tensor.positive) - ```python torch.Tensor.positive() ``` ### [paddle.positive](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/positive_cn.html#positive) - ```python paddle.positive(x) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.real.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.real.md index cf2a97385ee..312bd67fe7a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.real.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.real.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.real - +## [ 仅 API 调用方式不一致 ]torch.Tensor.real ### [torch.Tensor.real](https://pytorch.org/docs/stable/generated/torch.Tensor.real.html) - ```python torch.Tensor.real ``` ### [paddle.Tensor.real](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#real-name-none) - ```python paddle.Tensor.real ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.retain_grad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.retain_grad.md index 854d8bb7d97..0a003bcc91f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.retain_grad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.retain_grad.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.Tensor.retain_grad - +## [ 仅 API 调用方式不一致 ]torch.Tensor.retain_grad ### [torch.Tensor.retain_grad](https://pytorch.org/docs/stable/generated/torch.Tensor.retain_grad.html) - ```python torch.Tensor.retain_grad() ``` ### [paddle.Tensor.retain_grads](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Overview_cn.html#paddle) - ```python paddle.Tensor.retain_grads() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.sparse_mask.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.sparse_mask.md index cc37d899e3d..8f7814e550d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.sparse_mask.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.sparse_mask.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.sparse_mask - +## [ 仅 API 调用方式不一致 ]torch.Tensor.sparse_mask ### [torch.Tensor.sparse_mask](https://pytorch.org/docs/stable/generated/torch.Tensor.sparse_mask.html) - ```python torch.Tensor.sparse_mask(mask) ``` ### [paddle.sparse.mask_as](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/sparse/mask_as_cn.html) - ```python paddle.sparse.mask_as(x, mask, name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.square_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.square_.md index 0620473ed08..857e6b30c80 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.square_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.square_.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.square_ - +## [ 仅 API 调用方式不一致 ]torch.Tensor.square_ ### [torch.Tensor.square_](https://pytorch.org/docs/stable/generated/torch.Tensor.square_.html) - ```python torch.Tensor.square_() ``` ### [paddle.square_]() - ```python paddle.square_(x) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.to_sparse.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.to_sparse.md index 2403c98e327..970d2a6c512 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.to_sparse.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.Tensor.to_sparse.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.Tensor.to_sparse - +## [ 仅 API 调用方式不一致 ]torch.Tensor.to_sparse ### [torch.Tensor.to_sparse](https://pytorch.org/docs/stable/generated/torch.Tensor.to_sparse.html#torch.Tensor.to_sparse) - ```python torch.Tensor.to_sparse(sparse_dim) ``` ### [paddle.Tensor.to_sparse_coo]() - ```python paddle.Tensor.to_sparse_coo(sparse_dim) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.Function.forward.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.Function.forward.md index d9675bf1005..504fb2b5c6e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.Function.forward.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.Function.forward.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.autograd.Function.forward - +## [ 仅 API 调用方式不一致 ]torch.autograd.Function.forward ### [torch.autograd.Function.forward](https://pytorch.org/docs/stable/generated/torch.autograd.Function.forward.html#torch.autograd.Function.forward) - ```python torch.autograd.Function.forward(ctx, *args, **kwargs) ``` ### [paddle.autograd.PyLayer.forward](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/autograd/PyLayer_cn.html#forward-ctx-args-kwargs) - ```python paddle.autograd.PyLayer.forward(ctx, *args, **kwargs) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.enable_grad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.enable_grad.md index ea606a39ae7..5cb1fecbde5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.enable_grad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.enable_grad.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.autograd.enable_grad - +## [ 仅 API 调用方式不一致 ]torch.autograd.enable_grad ### [torch.autograd.enable_grad](https://pytorch.org/docs/stable/generated/torch.enable_grad.html#enable-grad) - ```python torch.autograd.enable_grad() ``` ### [paddle.enable_grad](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/enable_grad.html#enable-grad) - ```python paddle.enable_grad() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.md index 5411bd01346..54f529aa4dd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.autograd.function.FunctionCtx - +## [ 仅 API 调用方式不一致 ]torch.autograd.function.FunctionCtx ### [torch.autograd.function.FunctionCtx]() - ```python torch.autograd.function.FunctionCtx ``` ### [paddle.autograd.PyLayerContext](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/autograd/PyLayerContext_cn.html#pylayercontext) - ```python paddle.autograd.PyLayerContext ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.save_for_backward.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.save_for_backward.md index 686e3e44bb0..5a63180e878 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.save_for_backward.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.save_for_backward.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.autograd.function.FunctionCtx.save_for_backward - +## [ 仅 API 调用方式不一致 ]torch.autograd.function.FunctionCtx.save_for_backward ### [torch.autograd.function.FunctionCtx.save_for_backward](https://pytorch.org/docs/stable/generated/torch.autograd.function.FunctionCtx.save_for_backward.html#torch.autograd.function.FunctionCtx.save_for_backward) - ```python torch.autograd.function.FunctionCtx.save_for_backward(*tensors) ``` ### [paddle.autograd.PyLayerContext.save_for_backward](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/autograd/PyLayerContext_cn.html#save-for-backward-tensors) - ```python paddle.autograd.PyLayerContext.save_for_backward(*tensors) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.set_materialize_grads.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.set_materialize_grads.md index dbbc1c8b3a8..ffd92e6cd48 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.set_materialize_grads.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.function.FunctionCtx.set_materialize_grads.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.autograd.function.FunctionCtx.set_materialize_grads - +## [ 仅 API 调用方式不一致 ]torch.autograd.function.FunctionCtx.set_materialize_grads ### [torch.autograd.function.FunctionCtx.set_materialize_grads](https://pytorch.org/docs/stable/generated/torch.autograd.function.FunctionCtx.set_materialize_grads.html#torch.autograd.function.FunctionCtx.set_materialize_grads) - ```python torch.autograd.function.FunctionCtx.set_materialize_grads(value) ``` ### [paddle.autograd.PyLayerContext.set_materialize_grads](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/autograd/PyLayerContext_cn.html#set-materialize-grads-self-value) - ```python paddle.autograd.PyLayerContext.set_materialize_grads(value) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.grad_mode.set_grad_enabled.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.grad_mode.set_grad_enabled.md index ffbe9e34769..f47abbdf0bf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.grad_mode.set_grad_enabled.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.grad_mode.set_grad_enabled.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.autograd.grad_mode.set_grad_enabled - +## [ 仅 API 调用方式不一致 ]torch.autograd.grad_mode.set_grad_enabled ### [torch.autograd.grad_mode.set_grad_enabled](https://docs.pytorch.org/docs/stable/generated/torch.autograd.grad_mode.set_grad_enabled.html#torch.autograd.grad_mode.set_grad_enabled) - ```python torch.autograd.grad_mode.set_grad_enabled(mode) ``` ### [paddle.set_grad_enabled](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/set_grad_enabled_cn.html) - ```python paddle.set_grad_enabled(mode) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.graph.saved_tensors_hooks.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.graph.saved_tensors_hooks.md index e3b9d2e5632..ff6c4e522d9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.graph.saved_tensors_hooks.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.autograd.graph.saved_tensors_hooks.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.autograd.graph.saved_tensors_hooks - +## [ 仅 API 调用方式不一致 ]torch.autograd.graph.saved_tensors_hooks ### [torch.autograd.graph.saved_tensors_hooks](https://pytorch.org/docs/stable/autograd.html?highlight=saved_tensors_hooks#torch.autograd.graph.saved_tensors_hooks) - ```python torch.autograd.graph.saved_tensors_hooks(pack_hook, unpack_hook) ``` ### [paddle.autograd.saved_tensors_hooks](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/autograd/saved_tensors_hooks_cn.html) - ```python paddle.autograd.saved_tensors_hooks(pack_hook, unpack_hook) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.backends.cuda.is_built.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.backends.cuda.is_built.md index 2138303cb0a..bcf05bb6a1b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.backends.cuda.is_built.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.backends.cuda.is_built.md @@ -1,12 +1,10 @@ -## [仅 API 调用方式不一致]torch.backends.cuda.is_built - +## [ 仅 API 调用方式不一致 ]torch.backends.cuda.is_built ### [torch.backends.cuda.is_built](https://pytorch.org/docs/stable/backends.html?highlight=torch+backends+cudnn+is_available#torch.backends.cuda.is_built) ```python torch.backends.cuda.is_built() ``` ### [paddle.device.is_compiled_with_cuda](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/is_compiled_with_cuda_cn.html#is-compiled-with-cuda) - ```python paddle.device.is_compiled_with_cuda() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.backends.cudnn.version.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.backends.cudnn.version.md index 7d436664afc..2b9a38727cc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.backends.cudnn.version.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.backends.cudnn.version.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.backends.cudnn.version - +## [ 仅 API 调用方式不一致 ]torch.backends.cudnn.version ### [torch.backends.cudnn.version](https://pytorch.org/docs/stable/generated/torch.backends.cudnn.version.html) - ```python torch.backends.cudnn.version() ``` ### [paddle.device.get\_cudnn\_version](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/get_cudnn_version_cn.html#get-cudnn-version) - ```python paddle.device.get_cudnn_version() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cda.StreamContext.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cda.StreamContext.md index 3c9262e3640..c83df4e7edd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cda.StreamContext.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cda.StreamContext.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.StreamContext - +## [ 仅 API 调用方式不一致 ]torch.cuda.StreamContext ### [torch.cuda.StreamContext](https://pytorch.org/docs/stable/generated/torch.cuda.StreamContext.html#torch.cuda.StreamContext) - ```python torch.cuda.StreamContext(stream) ``` ### [paddle.device.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/stream_guard_cn.html#stream-guard) - ```python paddle.device.stream_guard(stream) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cpu.current_device.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cpu.current_device.md index 5a251395586..e66413d08e0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cpu.current_device.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cpu.current_device.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cpu.current_device - +## [ 仅 API 调用方式不一致 ]torch.cpu.current_device ### [torch.cpu.current_device](https://pytorch.org/docs/stable/generated/torch.cpu.current_device.html) - ```python torch.cpu.current_device() ``` ### [paddle.get_device](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/get_device_cn.html#get-device) - ```python paddle.get_device() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.Event.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.Event.md index f1e1383af6d..91089728d97 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.Event.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.Event.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.Event - +## [ 仅 API 调用方式不一致 ]torch.cuda.Event ### [torch.cuda.Event](https://pytorch.org/docs/stable/generated/torch.cuda.Event.html#torch.cuda.Event) - ```python torch.cuda.Event(enable_timing=False, blocking=False, interprocess=False) ``` ### [paddle.device.cuda.Event](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/Event_cn.html) - ```python paddle.device.cuda.Event(enable_timing=False, blocking=False, interprocess=False) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.get_device_name.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.get_device_name.md index b1a7d23509c..02192c8d79d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.get_device_name.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.get_device_name.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.get_device_name - +## [ 仅 API 调用方式不一致 ]torch.cuda.get_device_name ### [torch.cuda.get_device_name](https://pytorch.org/docs/stable/generated/torch.cuda.get_device_name.html) - ```python torch.cuda.get_device_name(device=None) ``` ### [paddle.device.cuda.get_device_name](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/get_device_name_cn.html) - ```python paddle.device.cuda.get_device_name(device=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.is_bf16_supported.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.is_bf16_supported.md index 976e80d55bc..ca2a674f51a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.is_bf16_supported.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.is_bf16_supported.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.is_bf16_supported - +## [ 仅 API 调用方式不一致 ]torch.cuda.is_bf16_supported ### [torch.cuda.is_bf16_supported](https://pytorch.org/docs/stable/cuda.html) - ```python torch.cuda.is_bf16_supported() ``` ### [paddle.amp.is_bfloat16_supported](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/is_bfloat16_supported_cn.html#is-bfloat16-supported) - ```python paddle.amp.is_bfloat16_supported() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.max_memory_allocated.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.max_memory_allocated.md index f929ea43072..8dd6856a6ee 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.max_memory_allocated.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.max_memory_allocated.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.max_memory_allocated - +## [ 仅 API 调用方式不一致 ]torch.cuda.max_memory_allocated ### [torch.cuda.max_memory_allocated](https://pytorch.org/docs/stable/generated/torch.cuda.max_memory_allocated.html#torch.cuda.max_memory_allocated) - ```python torch.cuda.max_memory_allocated(device) ``` ### [paddle.device.cuda.max_memory_allocated](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/max_memory_allocated_cn.html) - ```python paddle.device.cuda.max_memory_allocated(device) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.max_memory_reserved.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.max_memory_reserved.md index b57419a7db4..d428dcc16a1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.max_memory_reserved.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.max_memory_reserved.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.max_memory_reserved - +## [ 仅 API 调用方式不一致 ]torch.cuda.max_memory_reserved ### [torch.cuda.max_memory_reserved](https://pytorch.org/docs/stable/generated/torch.cuda.max_memory_reserved.html#torch.cuda.max_memory_reserved) - ```python torch.cuda.max_memory_reserved(device) ``` ### [paddle.device.cuda.max_memory_reserved](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/max_memory_reserved_cn.html) - ```python paddle.device.cuda.max_memory_reserved(device) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.nvtx.range_pop.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.nvtx.range_pop.md index 4e5aec9dc8f..51598ede266 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.nvtx.range_pop.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.nvtx.range_pop.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.nvtx.range_pop - +## [ 仅 API 调用方式不一致 ]torch.cuda.nvtx.range_pop ### [torch.cuda.nvtx.range_pop](https://pytorch.org/docs/stable/generated/torch.cuda.nvtx.range_pop.html#torch.cuda.nvtx.range_pop) - ```python torch.cuda.nvtx.range_pop() ``` ### [paddle.framework.core.nvprof_nvtx_pop](https://github.com/PaddlePaddle/Paddle/blob/645dfb4040a15712cea9ccfed4dcb0655aeeb0ea/paddle/fluid/pybind/pybind.cc#L2468) - ```python paddle.framework.core.nvprof_nvtx_pop() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.reset_max_memory_allocated.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.reset_max_memory_allocated.md index eb58735b809..1f49b45e0d6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.reset_max_memory_allocated.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.reset_max_memory_allocated.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.reset_max_memory_allocated - +## [ 仅 API 调用方式不一致 ]torch.cuda.reset_max_memory_allocated ### [torch.cuda.reset_max_memory_allocated](https://pytorch.org/docs/stable/generated/torch.cuda.reset_max_memory_allocated.html#torch.cuda.reset_max_memory_allocated) - ```python torch.cuda.reset_max_memory_allocated(device) ``` ### [paddle.device.cuda.reset_max_memory_allocated](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/reset_max_memory_allocated_cn.html) - ```python paddle.device.cuda.reset_max_memory_allocated(device) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.reset_max_memory_cached.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.reset_max_memory_cached.md index fa6398e38e9..63c64aaf0fb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.reset_max_memory_cached.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.reset_max_memory_cached.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.reset_max_memory_cached - +## [ 仅 API 调用方式不一致 ]torch.cuda.reset_max_memory_cached ### [torch.cuda.reset_max_memory_cached](https://docs.pytorch.org/docs/stable/generated/torch.cuda.reset_max_memory_cached.html#torch-cuda-reset-max-memory-cached) - ```python torch.cuda.reset_max_memory_cached(device) ``` ### [paddle.device.cuda.reset_max_memory_reserved](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/cuda/reset_max_memory_reserved_cn.html) - ```python paddle.device.cuda.reset_max_memory_reserved(device) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.set_stream.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.set_stream.md index 5828df108a9..fbc123a820d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.set_stream.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.set_stream.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.set_stream - +## [ 仅 API 调用方式不一致 ]torch.cuda.set_stream ### [torch.cuda.set_stream](https://pytorch.org/docs/stable/generated/torch.cuda.set_stream.html#torch.cuda.set_stream) - ```python torch.cuda.set_stream(stream) ``` ### [paddle.device.set_stream](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/set_stream_cn.html#set-stream) - ```python paddle.device.set_stream(stream=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.stream.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.stream.md index 8e2a04bba21..e7c79abd0ad 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.stream.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.cuda.stream.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.cuda.stream - +## [ 仅 API 调用方式不一致 ]torch.cuda.stream ### [torch.cuda.stream](https://pytorch.org/docs/stable/generated/torch.cuda.stream.html) - ```python torch.cuda.stream(stream) ``` ### [paddle.device.stream_guard](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/device/stream_guard_cn.html#stream-guard) - ```python paddle.device.stream_guard(stream) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributed.ReduceOp.PRODUCT.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributed.ReduceOp.PRODUCT.md index a1534adc857..50b1149ed5b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributed.ReduceOp.PRODUCT.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributed.ReduceOp.PRODUCT.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.distributed.ReduceOp.PRODUCT - +## [ 仅 API 调用方式不一致 ]torch.distributed.ReduceOp.PRODUCT ### [torch.distributed.ReduceOp.PRODUCT](https://pytorch.org/docs/stable/distributed.html#torch.distributed.ReduceOp) - ```python torch.distributed.ReduceOp.PRODUCT ``` ### [paddle.distributed.ReduceOp.PROD](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/ReduceOp_cn.html#reduceop) - ```python paddle.distributed.ReduceOp.PROD ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributed.is_nccl_available.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributed.is_nccl_available.md index 777aa24acf7..7f9cd0c9568 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributed.is_nccl_available.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributed.is_nccl_available.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.distributed.is_nccl_available - +## [ 仅 API 调用方式不一致 ]torch.distributed.is_nccl_available ### [torch.distributed.is_nccl_available](https://pytorch.org/docs/stable/distributed.html#torch.distributed.is_nccl_available) - ```python torch.distributed.is_nccl_available() ``` ### [paddle.core.is_compiled_with_nccl](https://github.com/PaddlePaddle/Paddle/blob/61de6003525166856157b6220205fe53df638376/python/paddle/jit/sot/utils/paddle_api_config.py#L159) - ```python paddle.core.is_compiled_with_nccl() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.constraints.Constraint.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.constraints.Constraint.md index cafe402d38a..0619f720026 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.constraints.Constraint.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.constraints.Constraint.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.distributions.constraints.Constraint - +## [ 仅 API 调用方式不一致 ]torch.distributions.constraints.Constraint ### [torch.distributions.constraints.Constraint](https://pytorch.org/docs/stable/distributions.html#module-torch.distributions.constraints) - ```python torch.distributions.constraints.Constraint() ``` ### [paddle.distribution.constraint.Constraint](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/distribution/constraint.py) - ```python paddle.distribution.constraint.Constraint() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.distribution.Distribution.log_prob.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.distribution.Distribution.log_prob.md index dc64266f7ef..b963db968e0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.distribution.Distribution.log_prob.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.distribution.Distribution.log_prob.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.distributions.distribution.Distribution.log_prob - +## [ 仅 API 调用方式不一致 ]torch.distributions.distribution.Distribution.log_prob ### [torch.distributions.distribution.Distribution.log\_prob](https://pytorch.org/docs/stable/distributions.html#torch.distributions.distribution.Distribution.log_prob) - ```python torch.distributions.distribution.Distribution.log_prob(value) ``` ### [paddle.distribution.Distribution.log\_prob](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Distribution_cn.html#log-prob-value) - ```python paddle.distribution.Distribution.log_prob(value) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.kl.kl_divergence.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.kl.kl_divergence.md index 4ac679cd407..d034adb8b25 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.kl.kl_divergence.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.distributions.kl.kl_divergence.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.distributions.kl.kl_divergence - +## [ 仅 API 调用方式不一致 ]torch.distributions.kl.kl_divergence ### [torch.distributions.kl.kl_divergence](https://pytorch.org/docs/stable/distributions.html?highlight=torch+distributions+kl+kl_divergence#torch.distributions.kl.kl_divergence) - ```python torch.distributions.kl.kl_divergence(p, q) ``` ### [paddle.distribution.kl_divergence](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/kl_divergence_cn.html) - ```python paddle.distribution.kl_divergence(p, q) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.is_inference.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.is_inference.md index f3902e3b0df..62fb2d91143 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.is_inference.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.is_inference.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.is_inference - +## [ 仅 API 调用方式不一致 ]torch.is_inference ### [torch.is_inference]() - ```python torch.is_inference(input) ``` ### [paddle.Tensor.stop_gradient]() - ```python paddle.Tensor.stop_gradient ``` @@ -15,7 +12,6 @@ paddle.Tensor.stop_gradient 两者功能一致,无参数。 `is_inference` 会强制关闭梯度记录。并且不能在中途设置梯度,而 `stop_gradient` 仅为停止计算该算子梯度,可在中途重新设为 `True` ,`Paddle` 为近似实现。 ### 转写示例 - ```python # PyTorch 写法 torch.is_inference(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.AdaptiveAvgPool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.AdaptiveAvgPool1d.md index c4340735d3a..c5e144950c6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.AdaptiveAvgPool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.AdaptiveAvgPool1d.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致] torch.nn.AdaptiveAvgPool1d - +## [ 仅 API 调用方式不一致 ]torch.nn.AdaptiveAvgPool1d ### [torch.nn.AdaptiveAvgPool1d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveAvgPool1d.html) - ```python torch.nn.AdaptiveAvgPool1d(output_size) ``` ### [paddle.nn.AdaptiveAvgPool1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/AdaptiveAvgPool1D_cn.html#adaptiveavgpool1d) - ```python paddle.nn.AdaptiveAvgPool1D(output_size, name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.HuberLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.HuberLoss.md index a3a50ae36c7..0d9bf858ff6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.HuberLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.HuberLoss.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.nn.HuberLoss - +## [ 仅 API 调用方式不一致 ]torch.nn.HuberLoss ### [torch.nn.HuberLoss](https://pytorch.org/docs/stable/generated/torch.nn.HuberLoss.html#torch.nn.HuberLoss) - ```python torch.nn.HuberLoss(reduction='mean', delta=1.0) ``` ### [paddle.nn.SmoothL1Loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/SmoothL1Loss_cn.html) - ```python paddle.nn.SmoothL1Loss(reduction='mean', delta=1.0, name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.apply.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.apply.md index 40c4727525a..b80bea2f945 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.apply.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.apply.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.nn.Module.apply - +## [ 仅 API 调用方式不一致 ]torch.nn.Module.apply ### [torch.nn.Module.apply](https://pytorch.org/docs/stable/generated/torch.nn.Module.html?highlight=torch+nn+module+apply#torch.nn.Module.apply) - ```python torch.nn.Module.apply(fn) ``` ### [paddle.nn.Layer.apply](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html) - ```python paddle.nn.Layer.apply(fn) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.children.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.children.md index d1b7cf114fe..d77ca465257 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.children.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.children.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.nn.Module.children - +## [ 仅 API 调用方式不一致 ]torch.nn.Module.children ### [torch.nn.Module.children](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.children) - ```python torch.nn.Module.children() ``` ### [paddle.nn.Layer.children](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#children) - ```python paddle.nn.Layer.children() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.eval.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.eval.md index b246d8538ad..696c615a036 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.eval.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.eval.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.nn.Module.eval - +## [ 仅 API 调用方式不一致 ]torch.nn.Module.eval ### [torch.nn.Module.eval](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.eval) - ```python torch.nn.Module.eval() ``` ### [paddle.nn.Layer.eval](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#eval) - ```python paddle.nn.Layer.eval() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.named_children.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.named_children.md index 48ad1115187..1ca22ac10a4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.named_children.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.named_children.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.nn.Module.named_children - +## [ 仅 API 调用方式不一致 ]torch.nn.Module.named_children ### [torch.nn.Module.named_children](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.named_children) - ```python torch.nn.Module.named_children() ``` ### [paddle.nn.Layer.named_children](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#named-children) - ```python paddle.nn.Layer.named_children() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.train.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.train.md index 981f646b88d..8f7d7fd7965 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.train.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.nn.Module.train.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.nn.Module.train - +## [ 仅 API 调用方式不一致 ]torch.nn.Module.train ### [torch.nn.Module.train](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.train) - ```python torch.nn.Module.train() ``` ### [paddle.nn.Layer.train](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#train) - ```python paddle.nn.Layer.train() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.numel.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.numel.md index 8e6b48b6244..0ba0c9a7736 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.numel.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.numel.md @@ -1,12 +1,10 @@ -## [仅 API 调用方式不一致]torch.numel +## [ 仅 API 调用方式不一致 ]torch.numel ### [torch.numel](https://pytorch.org/docs/stable/generated/torch.numel.html?highlight=numel#torch.numel) - ```python torch.numel(input) ``` ### [paddle.Tensor.size](https://www.paddlepaddle.org.cn/documentation/docs/guides/beginner/tensor_cn.html#tensor-shape) - ```python paddle.Tensor.size ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.add_param_group.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.add_param_group.md index a8899837828..79c3cf3fef6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.add_param_group.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.add_param_group.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.optim.Optimizer.add_param_group - +## [ 仅 API 调用方式不一致 ]torch.optim.Optimizer.add_param_group ### [torch.optim.Optimizer.add_param_group](https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.add_param_group.html?highlight=torch+optim+optimizer+add_param_group#torch.optim.Optimizer.add_param_group) - ```python torch.optim.Optimizer.add_param_group(param_group) ``` ### [paddle.optimizer.Optimizer._add_param_group]() - ```python paddle.optimizer.Optimizer._add_param_group(param_group) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.load_state_dict.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.load_state_dict.md index 0577a4b9e03..c7ef34004d5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.load_state_dict.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.load_state_dict.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.optim.Optimizer.load_state_dict - +## [ 仅 API 调用方式不一致 ]torch.optim.Optimizer.load_state_dict ### [torch.optim.Optimizer.load_state_dict](https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.load_state_dict.html#torch.optim.Optimizer.load_state_dict) - ```python torch.optim.Optimizer.load_state_dict(state_dict) ``` ### [paddle.optimizer.Optimizer.load_state_dict](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Optimizer_cn.html) - ```python paddle.optimizer.Optimizer.load_state_dict(state_dict) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.state_dict.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.state_dict.md index 1a0095e7ba1..48bf3fcccad 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.state_dict.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.optim.Optimizer.state_dict.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.optim.Optimizer.state_dict - +## [ 仅 API 调用方式不一致 ]torch.optim.Optimizer.state_dict ### [torch.optim.Optimizer.state_dict](https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.state_dict.html?highlight=torch+optim+optimizer+state_dict#torch.optim.Optimizer.state_dict) - ```python torch.optim.Optimizer.state_dict() ``` ### [paddle.optimizer.Optimizer.state_dict](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Optimizer_cn.html) - ```python paddle.optimizer.Optimizer.state_dict() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.ChainDataset.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.ChainDataset.md index 0757facfeac..d9af795d1aa 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.ChainDataset.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.ChainDataset.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.utils.data.ChainDataset - +## [ 仅 API 调用方式不一致 ]torch.utils.data.ChainDataset ### [torch.utils.data.ChainDataset](https://pytorch.org/docs/stable/data.html#torch.utils.data.ChainDataset) - ```python torch.utils.data.ChainDataset(datasets) ``` ### [paddle.io.ChainDataset](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/ChainDataset_cn.html) - ```python paddle.io.ChainDataset(datasets) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.ConcatDataset.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.ConcatDataset.md index c1e2539f8a1..128339e940c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.ConcatDataset.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.ConcatDataset.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.utils.data.ConcatDataset - +## [ 仅 API 调用方式不一致 ]torch.utils.data.ConcatDataset ### [torch.utils.data.ConcatDataset](https://pytorch.org/docs/stable/data.html#torch.utils.data.ConcatDataset) - ```python torch.utils.data.ConcatDataset(datasets) ``` ### [paddle.io.ConcatDataset](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/ConcatDataset_cn.html) - ```python paddle.io.ConcatDataset(datasets) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Dataset.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Dataset.md index 7d0300dca61..8de0920b70f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Dataset.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Dataset.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.utils.data.Dataset - +## [ 仅 API 调用方式不一致 ]torch.utils.data.Dataset ### [torch.utils.data.Dataset](https://pytorch.org/docs/stable/data.html?highlight=torch%20utils%20data%20dataset#torch.utils.data.Dataset) - ```python torch.utils.data.Dataset() ``` ### [paddle.io.Dataset](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/io/Dataset_cn.html#dataset) - ```python paddle.io.Dataset() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.IterableDataset.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.IterableDataset.md index af29e29ef7c..c25ee737715 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.IterableDataset.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.IterableDataset.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.utils.data.IterableDataset - +## [ 仅 API 调用方式不一致 ]torch.utils.data.IterableDataset ### [torch.utils.data.IterableDataset](https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset) - ```python torch.utils.data.IterableDataset() ``` ### [paddle.io.IterableDataset](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/IterableDataset_cn.html#iterabledataset) - ```python paddle.io.IterableDataset() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Sampler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Sampler.md index 85ad9595ebf..0a2031c2dbf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Sampler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Sampler.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.utils.data.Sampler - +## [ 仅 API 调用方式不一致 ]torch.utils.data.Sampler ### [torch.utils.data.Sampler](https://pytorch.org/docs/stable/data.html#torch.utils.data.Sampler) - ```python torch.utils.data.Sampler(data_source) ``` ### [paddle.io.Sampler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/Sampler_cn.html) - ```python paddle.io.Sampler(data_source) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.SequentialSampler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.SequentialSampler.md index 3e1d112e696..be273516023 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.SequentialSampler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.SequentialSampler.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.utils.data.SequentialSampler - +## [ 仅 API 调用方式不一致 ]torch.utils.data.SequentialSampler ### [torch.utils.data.SequentialSampler](https://pytorch.org/docs/stable/generated/torch.utils.data.SequentialSampler.html) - ```python torch.utils.data.SequentialSampler(data_source) ``` ### [paddle.io.SequenceSampler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/SequenceSampler_cn.html#sequencesampler) - ```python paddle.io.SequenceSampler(data_source) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Subset.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Subset.md index d6db718284c..2d463d88f56 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Subset.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.Subset.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.utils.data.Subset - +## [ 仅 API 调用方式不一致 ]torch.utils.data.Subset ### [torch.utils.data.Subset](https://pytorch.org/docs/stable/data.html#torch.utils.data.Subset) - ```python torch.utils.data.Subset(dataset, indices) ``` ### [paddle.io.Subset](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/Subset_cn.html) - ```python paddle.io.Subset(dataset, indices) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.get_worker_info.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.get_worker_info.md index 5da8a2ccef6..56909bc0fc7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.get_worker_info.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.get_worker_info.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torch.utils.data.get_worker_info - +## [ 仅 API 调用方式不一致 ]torch.utils.data.get_worker_info ### [torch.utils.data.get_worker_info](https://pytorch.org/docs/stable/data.html#torch.utils.data.get_worker_info) - ```python torch.utils.data.get_worker_info() ``` ### [paddle.io.get_worker_info](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/get_worker_info_cn.html#get-worker-info) - ```python paddle.io.get_worker_info() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.random_split.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.random_split.md index ebadef9dbc2..bf764184e26 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.random_split.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torch.utils.data.random_split.md @@ -1,6 +1,5 @@ -## [仅 API 调用方式不一致]torch.utils.data.random_split +## [ 仅 API 调用方式不一致 ]torch.utils.data.random_split ### [torch.utils.data.random_split](https://pytorch.org/docs/stable/data.html?highlight=torch+utils+data+random_split#torch.utils.data.random_split) - ```python torch.utils.data.random_split(dataset, lengths, @@ -8,7 +7,6 @@ torch.utils.data.random_split(dataset, ``` ### [paddle.io.random_split](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/random_split_cn.html) - ```python paddle.io.random_split(dataset, lengths, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.ops.RoIPool.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.ops.RoIPool.md index 3c150e9ed29..534335c0234 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.ops.RoIPool.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.ops.RoIPool.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.ops.RoIPool - +## [ 仅 API 调用方式不一致 ]torchvision.ops.RoIPool ### [torchvision.ops.RoIPool](https://pytorch.org/vision/main/generated/torchvision.ops.RoIPool.html) - ```python torchvision.ops.RoIPool(output_size: None, spatial_scale: float) ``` ### [paddle.vision.ops.RoIPool](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/ops/RoIPool_cn.html) - ```python paddle.vision.ops.RoIPool(output_size, spatial_scale=1.0) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transform.functional.pad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transform.functional.pad.md index 5b0b2b3fd3b..170a6794f2a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transform.functional.pad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transform.functional.pad.md @@ -1,7 +1,5 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.pad - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.pad ### [torchvision.transforms.functional.pad](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.pad.html) - ```python torchvision.transforms.functional.pad( img: Union[PIL.Image.Image, torch.Tensor], @@ -12,7 +10,6 @@ torchvision.transforms.functional.pad( ``` ### [paddle.vision.transforms.pad](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/transforms/pad_cn.html) - ```python paddle.vision.transforms.pad( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.Compose.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.Compose.md index 5fc3840a5ab..2afeb4331b9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.Compose.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.Compose.md @@ -1,7 +1,5 @@ -## [仅 API 调用方式不一致]torchvision.transforms.Compose - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.Compose ### [torchvision.transforms.Compose](https://pytorch.org/vision/main/generated/torchvision.transforms.Compose.html) - ```python torchvision.transforms.Compose( transforms: List[Transform] @@ -9,7 +7,6 @@ torchvision.transforms.Compose( ``` ### [paddle.vision.transforms.Compose](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/Compose_cn.html) - ```python paddle.vision.transforms.Compose( transforms: Union[List[Transform], Tuple[Transform, ...]] diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BICUBIC.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BICUBIC.md index d2b494fb430..66cb335dd1d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BICUBIC.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BICUBIC.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.InterpolationMode.BICUBIC - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.InterpolationMode.BICUBIC ### [torchvision.transforms.InterpolationMode.BICUBIC](https://pytorch.org/vision/stable/index.html) - ```python torchvision.transforms.InterpolationMode.BICUBIC ``` ### ['bicubic']() - ```python 'bicubic' ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BILINEAR.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BILINEAR.md index 5901e2eaa07..f29d36366d2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BILINEAR.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BILINEAR.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.InterpolationMode.BILINEAR - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.InterpolationMode.BILINEAR ### [torchvision.transforms.InterpolationMode.BILINEAR](https://pytorch.org/vision/stable/index.html) - ```python torchvision.transforms.InterpolationMode.BILINEAR ``` ### ['bilinear']() - ```python 'bilinear' ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BOX.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BOX.md index d3c2e4e1554..b6b9604b3d9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BOX.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.BOX.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.InterpolationMode.BOX - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.InterpolationMode.BOX ### [torchvision.transforms.InterpolationMode.BOX](https://pytorch.org/vision/stable/index.html) - ```python torchvision.transforms.InterpolationMode.BOX ``` ### ['box']() - ```python 'box' ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.HAMMING.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.HAMMING.md index a4c5c5ef988..207bb5033d4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.HAMMING.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.HAMMING.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.InterpolationMode.HAMMING - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.InterpolationMode.HAMMING ### [torchvision.transforms.InterpolationMode.HAMMING](https://pytorch.org/vision/stable/index.html) - ```python torchvision.transforms.InterpolationMode.HAMMING ``` ### ['hamming']() - ```python 'hamming' ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.LANCZOS.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.LANCZOS.md index fb4901344cb..ffa836ce394 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.LANCZOS.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.LANCZOS.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.InterpolationMode.LANCZOS - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.InterpolationMode.LANCZOS ### [torchvision.transforms.InterpolationMode.LANCZOS](https://pytorch.org/vision/stable/index.html) - ```python torchvision.transforms.InterpolationMode.LANCZOS ``` ### ['lanczos']() - ```python 'lanczos' ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.NEAREST.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.NEAREST.md index 65ffed37b6f..9daacb7e048 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.NEAREST.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.NEAREST.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.InterpolationMode.NEAREST - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.InterpolationMode.NEAREST ### [torchvision.transforms.InterpolationMode.NEAREST](https://pytorch.org/vision/stable/index.html) - ```python torchvision.transforms.InterpolationMode.NEAREST ``` ### ['nearest']() - ```python 'nearest' ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.NEAREST_EXACT.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.NEAREST_EXACT.md index d87c96d8d1a..44b9a0ff852 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.NEAREST_EXACT.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.InterpolationMode.NEAREST_EXACT.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.InterpolationMode.NEAREST_EXACT - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.InterpolationMode.NEAREST_EXACT ### [torchvision.transforms.InterpolationMode.NEAREST_EXACT](https://pytorch.org/vision/stable/index.html) - ```python torchvision.transforms.InterpolationMode.NEAREST_EXACT ``` ### ['nearest_exact']() - ```python 'nearest_exact' ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_brightness.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_brightness.md index cb435c0937e..63b5c780e63 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_brightness.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_brightness.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.adjust_brightness - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.adjust_brightness ### [torchvision.transforms.functional.adjust_brightness](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.adjust_brightness.html) - ```python torchvision.transforms.functional.adjust_brightness(img: Tensor, brightness_factor: float) ``` ### [paddle.vision.transforms.adjust_brightness](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/adjust_brightness_cn.html) - ```python paddle.vision.transforms.adjust_brightness( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_contrast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_contrast.md index 2846443c13a..d2eb7fe3752 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_contrast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_contrast.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.adjust_contrast - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.adjust_contrast ### [torchvision.transforms.functional.adjust_contrast](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.adjust_contrast.html) - ```python torchvision.transforms.functional.adjust_contrast(img: Tensor, contrast_factor: float) ``` ### [paddle.vision.transforms.adjust_contrast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/adjust_contrast_cn.html) - ```python paddle.vision.transforms.adjust_contrast( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_hue.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_hue.md index 25c8f805ea3..93f127dcf8b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_hue.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.adjust_hue.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.adjust_hue - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.adjust_hue ### [torchvision.transforms.functional.adjust_hue](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.adjust_hue.html) - ```python torchvision.transforms.functional.adjust_hue(img: Tensor, hue_factor: float) ``` ### [paddle.vision.transforms.adjust_hue](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/adjust_hue_cn.html) - ```python paddle.vision.transforms.adjust_hue( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.center_crop.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.center_crop.md index b3f50036367..fccde598f5a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.center_crop.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.center_crop.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.center_crop - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.center_crop ### [torchvision.transforms.functional.center_crop](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.center_crop.html) - ```python torchvision.transforms.functional.center_crop(img: Tensor, output_size: List[int]) ``` ### [paddle.vision.transforms.center_crop](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/center_crop_cn.html) - ```python paddle.vision.transforms.center_crop( img: Union[PIL.Image.Image, paddle.Tensor, np.ndarray], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.crop.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.crop.md index d9523103378..d1475bb4e1e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.crop.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.crop.md @@ -1,7 +1,5 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.crop - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.crop ### [torchvision.transforms.functional.crop](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.crop.html) - ```python torchvision.transforms.functional.crop( img: Union[PIL.Image.Image, torch.Tensor], @@ -13,7 +11,6 @@ torchvision.transforms.functional.crop( ``` ### [paddle.vision.transforms.crop](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/crop_cn.html) - ```python paddle.vision.transforms.crop( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.erase.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.erase.md index f1c3edb572e..597d609eb55 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.erase.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.erase.md @@ -1,7 +1,5 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.erase - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.erase ### [torchvision.transforms.functional.erase](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.erase.html?highlight=erase#torchvision.transforms.functional.erase) - ```python torchvision.transforms.functional.erase( img: Tensor, @@ -15,7 +13,6 @@ torchvision.transforms.functional.erase( ``` ### [paddle.vision.transforms.erase](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/erase_cn.html) - ```python paddle.vision.transforms.erase( img: Union[paddle.Tensor, np.ndarray, PIL.Image.Image], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.hflip.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.hflip.md index f9b3a2df87a..9164c718754 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.hflip.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.hflip.md @@ -1,7 +1,5 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.hflip - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.hflip ### [torchvision.transforms.functional.hflip](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.hflip.html) - ```python torchvision.transforms.functional.hflip( img: Union[PIL.Image.Image, torch.Tensor] @@ -9,7 +7,6 @@ torchvision.transforms.functional.hflip( ``` ### [paddle.vision.transforms.hflip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/hflip_cn.html) - ```python paddle.vision.transforms.hflip( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor] diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.to_grayscale.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.to_grayscale.md index 4fe083bed0f..63f0672b728 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.to_grayscale.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.to_grayscale.md @@ -1,14 +1,11 @@ -## [仅 API 调用方式不一致]torchvision.transforms.functional.to_grayscale - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.to_grayscale ### [torchvision.transforms.functional.to_grayscale](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.to_grayscale.html?highlight=to_grayscale#torchvision.transforms.functional.to_grayscale) - ```python torchvision.transforms.functional.to_grayscale(img: PIL.Image.Image, num_output_channels: int = 1) ``` ### [paddle.vision.transforms.to_grayscale](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/to_grayscale_cn.html#to-grayscale) - ```python paddle.vision.transforms.to_grayscale( img: Union[PIL.Image.Image, np.ndarray], diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.vflip.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.vflip.md index 29d05d8d5ae..c1eaa58646a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.vflip.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/torchvision.transforms.functional.vflip.md @@ -1,7 +1,5 @@ -## [仅 API 调用方式不一致] torchvision.transforms.functional.vflip - +## [ 仅 API 调用方式不一致 ]torchvision.transforms.functional.vflip ### [torchvision.transforms.functional.vflip](https://pytorch.org/vision/main/generated/torchvision.transforms.functional.vflip.html) - ```python torchvision.transforms.functional.vflip( img: Union[PIL.Image.Image, torch.Tensor] @@ -9,7 +7,6 @@ torchvision.transforms.functional.vflip( ``` ### [paddle.vision.transforms.vflip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/vflip_cn.html) - ```python paddle.vision.transforms.vflip( img: Union[PIL.Image.Image, np.ndarray, paddle.Tensor] diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.generation.LogitsProcessorList.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.generation.LogitsProcessorList.md index 14430289480..7c122ed9a17 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.generation.LogitsProcessorList.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.generation.LogitsProcessorList.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]transformers.generation.LogitsProcessorList - +## [ 仅 API 调用方式不一致 ]transformers.generation.LogitsProcessorList ### [transformers.generation.LogitsProcessorList](https://hf-mirror.com/docs/transformers/v4.42.0/en/internal/generation_utils#transformers.LogitsProcessorList) - ```python transformers.generation.LogitsProcessorList() ``` ### [paddlenlp.generation.LogitsProcessorList](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/transformers/bloom/processor.py#L24) - ```python paddlenlp.generation.LogitsProcessorList() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.generation.utils.GenerateOutput.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.generation.utils.GenerateOutput.md index 53681fd6ea9..be6681c5ed4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.generation.utils.GenerateOutput.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.generation.utils.GenerateOutput.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]transformers.generation.utils.GenerateOutput - +## [ 仅 API 调用方式不一致 ]transformers.generation.utils.GenerateOutput ### [transformers.generation.utils.GenerateOutput](https://github.com/huggingface/transformers/blob/v4.42.0/src/transformers/generation/utils.py#L345) - ```python transformers.generation.utils.GenerateOutput() ``` ### [paddlenlp.transformers.model_outputs.BaseModelOutput](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/transformers/model_outputs.py#L513) - ```python paddlenlp.transformers.model_outputs.BaseModelOutput() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.modeling_outputs.BaseModelOutputWithPast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.modeling_outputs.BaseModelOutputWithPast.md index 2627f439da5..d14561c9037 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.modeling_outputs.BaseModelOutputWithPast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.modeling_outputs.BaseModelOutputWithPast.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]transformers.modeling_outputs.BaseModelOutputWithPast - +## [ 仅 API 调用方式不一致 ]transformers.modeling_outputs.BaseModelOutputWithPast ### [transformers.modeling_outputs.BaseModelOutputWithPast](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast) - ```python transformers.modeling_outputs.BaseModelOutputWithPast(last_hidden_state: FloatTensor = None, past_key_values: Optional = None, hidden_states: Optional = None, attentions: Optional = None) ``` ### [paddlenlp.transformers.model_outputs.BaseModelOutputWithPast](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/transformers/model_outputs.py#L590) - ```python paddlenlp.transformers.model_outputs.BaseModelOutputWithPast(last_hidden_state: paddle.Tensor = None, past_key_values: Optional[Tuple[Tuple[paddle.Tensor]]] = None, hidden_states: Optional[Tuple[paddle.Tensor]] = None, attentions: Optional[Tuple[paddle.Tensor]] = None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.modeling_outputs.CausalLMOutputWithPast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.modeling_outputs.CausalLMOutputWithPast.md index 1ce5daaaf26..d4024f02265 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.modeling_outputs.CausalLMOutputWithPast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.modeling_outputs.CausalLMOutputWithPast.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]transformers.modeling_outputs.CausalLMOutputWithPast - +## [ 仅 API 调用方式不一致 ]transformers.modeling_outputs.CausalLMOutputWithPast ### [transformers.modeling_outputs.CausalLMOutputWithPast](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast) - ```python transformers.modeling_outputs.CausalLMOutputWithPast(loss: Optional = None, logits: FloatTensor = None, past_key_values: Optional = None, hidden_states: Optional = None, attentions: Optional = None) ``` ### [paddlenlp.transformers.model_outputs.CausalLMOutputWithPast](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/transformers/model_outputs.py#L874) - ```python paddlenlp.transformers.model_outputs.CausalLMOutputWithPast(loss: Optional[paddle.Tensor] = None, logits: paddle.Tensor = None, past_key_values: Optional[Tuple[Tuple[paddle.Tensor]]] = None, hidden_states: Optional[Tuple[paddle.Tensor]] = None, attentions: Optional[Tuple[paddle.Tensor]] = None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.utils.add_start_docstrings_to_model_forward.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.utils.add_start_docstrings_to_model_forward.md index 670c7a13aa7..6c88fcbc2e8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.utils.add_start_docstrings_to_model_forward.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/invok_diff_only/transformers.utils.add_start_docstrings_to_model_forward.md @@ -1,13 +1,10 @@ -## [仅 API 调用方式不一致]transformers.utils.add_start_docstrings_to_model_forward - +## [ 仅 API 调用方式不一致 ]transformers.utils.add_start_docstrings_to_model_forward ### [transformers.utils.add_start_docstrings_to_model_forward](https://github.com/huggingface/transformers/blob/44b231671db25974cfebcdae34402ad5099bf37a/src/transformers/utils/doc.py#L45) - ```python transformers.utils.add_start_docstrings_to_model_forward(*docstr) ``` ### [paddlenlp.trainer.utils.add_start_docstrings_to_model_forward](https://github.com/PaddlePaddle/PaddleNLP/blob/8fd74f0b74cdae12e74518b9dbbb8f6c6219c338/paddlenlp/trainer/utils/doc.py#L27) - ```python paddlenlp.trainer.utils.add_start_docstrings_to_model_forward(*docstr) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.utils.data.RandomSampler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.utils.data.RandomSampler.md index 5d34038b4ba..8541153a758 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.utils.data.RandomSampler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.utils.data.RandomSampler.md @@ -1,13 +1,10 @@ -## [暂未分类] torch.utils.data.RandomSampler - +## [ 暂未分类 ]torch.utils.data.RandomSampler ### [torch.utils.data.RandomSampler](https://pytorch.org/docs/stable/data.html#torch.utils.data.RandomSampler) - ```python torch.utils.data.RandomSampler(data_source, replacement=False, num_samples=None, generator=None) ``` ### [paddle.io.RandomSampler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/RandomSampler_cn.html#paddle.io.RandomSampler) - ```python paddle.io.RandomSampler(data_source, replacement=False, num_samples=None, generator=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.utils.data.WeightedRandomSampler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.utils.data.WeightedRandomSampler.md index d885e25f134..fcefd17f784 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.utils.data.WeightedRandomSampler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/others/torch.utils.data.WeightedRandomSampler.md @@ -1,7 +1,5 @@ -## [暂未分类] torch.utils.data.WeightedRandomSampler - +## [ 暂未分类 ]torch.utils.data.WeightedRandomSampler ### [torch.utils.data.WeightedRandomSampler](https://pytorch.org/docs/stable/data.html#torch.utils.data.WeightedRandomSampler) - ```python torch.utils.data.WeightedRandomSampler(weights, num_samples, @@ -10,7 +8,6 @@ torch.utils.data.WeightedRandomSampler(weights, ``` ### [paddle.io.WeightedRandomSampler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/WeightedRandomSampler_cn.html#paddle.io.WeightedRandomSampler) - ```python paddle.io.WeightedRandomSampler(weights, num_samples, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/others/transformers.PreTrainedTokenizer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/others/transformers.PreTrainedTokenizer.md index 88a427d7c55..4484c63e33a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/others/transformers.PreTrainedTokenizer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/others/transformers.PreTrainedTokenizer.md @@ -1,13 +1,10 @@ -## [暂未分类]transformers.PreTrainedTokenizer - +## [ 暂未分类 ]transformers.PreTrainedTokenizer ### [transformers.PreTrainedTokenizer](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer) - ```python transformers.PreTrainedTokenizer(**kwargs) ``` ### [paddlenlp.transformers.PretrainedTokenizer](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/transformers/tokenizer_utils.py#L881) - ```python paddlenlp.transformers.PretrainedTokenizer(**kwargs) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.allclose.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.allclose.md index 1bed9931908..9a0b6427f9c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.allclose.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.allclose.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]torch.Tensor.allclose - ### [torch.Tensor.allclose](https://pytorch.org/docs/stable/generated/torch.Tensor.allclose.html) - ```python torch.Tensor.allclose(other, rtol=1e-05, atol=1e-08, equal_nan=False) ``` ### [paddle.Tensor.allclose](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#allclose-y-rtol-1e-05-atol-1e-08-equal-nan-false-name-none) - ```python paddle.Tensor.allclose(y, rtol=1e-05, atol=1e-08, equal_nan=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.allclose(y, rtol=1e-05, atol=1e-08, equal_nan=False, name=None) 其中 PyTorch 和 Paddle 功能一致,返回类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | -- | | other | y | 输入 Tensor,仅参数名不一致。 | @@ -25,9 +21,7 @@ paddle.Tensor.allclose(y, rtol=1e-05, atol=1e-08, equal_nan=False, name=None) | 返回值 | 返回值 | PyTorch 返回值为标量, Paddle 返回值 0D Tensor。| ### 转写示例 - #### 返回值 - ```python # PyTorch 写法 x.allclose(y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.equal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.equal.md index 00471adf3d8..5b54539dc19 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.equal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.equal.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]torch.Tensor.equal - ### [torch.Tensor.equal](https://pytorch.org/docs/stable/generated/torch.Tensor.equal.html?highlight=equal#torch.Tensor.equal) - ```python torch.Tensor.equal(other) ``` ### [paddle.Tensor.equal_all](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#equal-all-y-name-none) - ```python paddle.Tensor.equal_all(y, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.equal_all(y, name=None) 两者功能一致但返回参数类型不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | other | y | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.histc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.histc.md index d2565be4c71..8047ea1bfce 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.histc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.histc.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]torch.Tensor.histc - ### [torch.Tensor.histc](https://pytorch.org/docs/stable/generated/torch.Tensor.histc.html?highlight=torch+tensor+histc#torch.Tensor.histc) - ```python torch.Tensor.histc(bins=100, min=0, max=0) ``` ### [paddle.Tensor.histogram](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#histogram-bins-100-min-0-max-0) - ```python paddle.Tensor.histogram(bins=100, min=0, max=0, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.histogram(bins=100, min=0, max=0, name=None) 返回 Tensor 的数据类型不一致,PyTorch 返回数据类型与输入 Tensor 一致, Paddle 默认返回 int64 类型。 ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |-----------------------------------|------------------------------| ------------------------------------------------------ | | bins | bins | 直方图 bins(直条)的个数,默认为 100。 | @@ -23,7 +19,6 @@ paddle.Tensor.histogram(bins=100, min=0, max=0, name=None) | max | max | range 的上边界(包含),默认为 0。 | ### 转写示例 - ```python # PyTorch 写法 y = a.histc(bins=3, min=2, max=4) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.max.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.max.md index 6acd6f608d2..f18849396dd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.max.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.max.md @@ -1,17 +1,14 @@ ## [ 返回参数类型不一致 ]torch.Tensor.max - 该 api 有两组参数列表重载,因此有两组差异分析。 ----------------------------------------------- ### [torch.Tensor.max](https://pytorch.org/docs/stable/generated/torch.Tensor.max.html) - ```python torch.Tensor.max(dim=None, keepdim=False) ``` ### [paddle.Tensor.max](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#max-axis-none-keepdim-false-name-none) - ```python paddle.Tensor.max(axis=None, keepdim=False, name=None) ``` @@ -19,7 +16,6 @@ paddle.Tensor.max(axis=None, keepdim=False, name=None) 其中 PyTorch 与 Paddle 指定 `dim` 后返回值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 求最大值运算的维度, 仅参数名不一致。 | @@ -27,7 +23,6 @@ paddle.Tensor.max(axis=None, keepdim=False, name=None) | 返回值 | 返回值 | 表示返回结果,当指定 dim 后,PyTorch 会返回比较结果和元素索引, Paddle 不会返回元素索引,需要转写。 | ### 转写示例 - #### 指定 dim 后的返回值 ```python # PyTorch 写法 @@ -40,13 +35,11 @@ result = x.max(dim=1), x.argmax(dim=1) -------------------------------------------------------------- ### [torch.Tensor.max](https://pytorch.org/docs/stable/generated/torch.Tensor.max.html) - ```python torch.Tensor.max(other) ``` ### [paddle.Tensor.maximum](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#maximum-y-axis-1-name-none) - ```python paddle.Tensor.maximum(y) ``` @@ -54,7 +47,6 @@ paddle.Tensor.maximum(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------- | ---------------------- | ------------------------------------ | | other | y | 输⼊ Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.min.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.min.md index 03b2e2a4087..8765fb2fa65 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.min.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.min.md @@ -1,17 +1,14 @@ ## [ 返回参数类型不一致 ]torch.Tensor.min - 该 api 有两组参数列表重载,因此有两组差异分析。 ----------------------------------------------- ### [torch.Tensor.min](https://pytorch.org/docs/stable/generated/torch.Tensor.min.html) - ```python torch.Tensor.min(dim=None, keepdim=False) ``` ### [paddle.Tensor.min](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#min-axis-none-keepdim-false-name-none) - ```python paddle.Tensor.min(axis=None, keepdim=False, name=None) ``` @@ -19,7 +16,6 @@ paddle.Tensor.min(axis=None, keepdim=False, name=None) 其中 PyTorch 与 Paddle 指定 `dim` 后返回值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 求最小值运算的维度, 仅参数名不一致。 | @@ -27,7 +23,6 @@ paddle.Tensor.min(axis=None, keepdim=False, name=None) | 返回值 | 返回值 | 表示返回结果,当指定 dim 后,PyTorch 会返回比较结果和元素索引, Paddle 不会返回元素索引,需要转写。 | ### 转写示例 - #### 指定 dim 后的返回值 ```python # PyTorch 写法 @@ -40,13 +35,11 @@ result = x.min(dim=1), x.argmin(dim=1) -------------------------------------------------------------- ### [torch.Tensor.min](https://pytorch.org/docs/stable/generated/torch.Tensor.min.html) - ```python torch.Tensor.min(other) ``` ### [paddle.Tensor.minimum](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#minimum-y-axis-1-name-none) - ```python paddle.Tensor.minimum(y) ``` @@ -54,7 +47,6 @@ paddle.Tensor.minimum(y) 两者功能一致且参数用法一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------- | ---------------------- | ------------------------------------ | | other | y | 输⼊ Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.slogdet.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.slogdet.md index 1e9dc6d77b4..8e576207c66 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.slogdet.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.slogdet.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]torch.Tensor.slogdet - ### [torch.Tensor.slogdet](https://pytorch.org/docs/stable/generated/torch.Tensor.slogdet.html) - ```python torch.Tensor.slogdet() ``` ### [paddle.linalg.slogdet](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/slogdet_cn.html#slogdet) - ```python paddle.linalg.slogdet(x) ``` @@ -15,7 +12,6 @@ paddle.linalg.slogdet(x) 两者功能一致,返回参数的个数不同,PyTorch 返回两个 Tesnor,Paddle 返回一个 Tensor,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | self | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,6 @@ paddle.linalg.slogdet(x) ### 转写示例 - #### 返回值 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.sort.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.sort.md index 2feccf269a9..43f798f94cb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.sort.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.sort.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]torch.Tensor.sort - ### [torch.Tensor.sort](https://pytorch.org/docs/stable/generated/torch.Tensor.sort.html#torch-tensor-sort) - ```python torch.Tensor.sort(dim=-1, descending=False, stable=False) ``` ### [paddle.Tensor.sort](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sort_cn.html#sort) - ```python paddle.Tensor.sort(axis=-1, descending=False, stable=False) ``` @@ -15,7 +12,6 @@ paddle.Tensor.sort(axis=-1, descending=False, stable=False) 两者功能一致但返回参数类型不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 指定对输入 Tensor 进行运算的轴。默认值为-1, 仅参数名不一致。 | @@ -26,9 +22,7 @@ paddle.Tensor.sort(axis=-1, descending=False, stable=False) 注:PyTorch 返回 (Tensor, LongTensor),Paddle 返回 Tensor 。 ### 转写示例 - #### 返回值 - ```python # 若要返回排序后的元素和元素索引,需要结合 argsort 进行转写 # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.triangular_solve.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.triangular_solve.md index d619f2bde62..a4d2382e37d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.triangular_solve.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.Tensor.triangular_solve.md @@ -1,13 +1,10 @@ -## [返回参数类型不一致]torch.Tensor.triangular_solve - +## [ 返回参数类型不一致 ]torch.Tensor.triangular_solve ### [torch.Tensor.triangular_solve](https://pytorch.org/docs/stable/generated/torch.Tensor.triangular_solve.html#torch.Tensor.triangular_solve) - ```python torch.Tensor.triangular_solve(A, upper=True, transpose=False, unitriangular=False) ``` ### [paddle.linalg.triangular_solve](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/triangular_solve_cn.html) - ```python paddle.linalg.triangular_solve(x, y, upper=True, transpose=False, unitriangular=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.triangular_solve(x, y, upper=True, transpose=False, unitriangular= Pytorch 为 Tensor 类方法,Paddle 为普通函数,另外两者的返回 Tensor 个数不同。参数对应关系如下表所示: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------- | ----------------------------------------------------------- | | A | x | 线性方程组系数矩阵。 | @@ -26,13 +22,11 @@ Pytorch 为 Tensor 类方法,Paddle 为普通函数,另外两者的返回 Te | 返回值 | 返回值 | Pytorch 返回两个 Tensor:solution 与 A,Paddle 仅返回一个 Tensor:solution。需要转写。 | ### 转写示例 - #### 返回值 ```python # PyTorch 写法: b.triangular_solve(A) # Paddle 写法: -## 注:Paddle 将 A 与 b 交换 -tuple(paddle.linalg.triangular_solve(A, b), A) +## 注:Paddle 将 A 与 b 交换 tuple(paddle.linalg.triangular_solve(A, b), A) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.cuda.get_rng_state_all.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.cuda.get_rng_state_all.md index b08e2359c4e..5439cfc6900 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.cuda.get_rng_state_all.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.cuda.get_rng_state_all.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]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() ``` ### [paddle.get_rng_state]() - ```python paddle.get_rng_state(device='gpu') ``` @@ -15,16 +12,13 @@ paddle.get_rng_state(device='gpu') paddle 参数更多,并且 torch 与 paddle 的返回参数类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------------------------------------------------- | | - | device | 返回随机数生成器状态的设备,PyTorch 无此参数,Paddle 需设置为'gpu' 。 | | 返回值 | 返回值 | 返回参数类型不一致, PyTorch 返回 torch.ByteTensor,Paddle 返回 GeneratorState 对象。 | ### 转写示例 - #### 返回参数类型不同 - ```python # PyTorch 写法,返回 torch.ByteTensor x = torch.cuda.get_rng_state_all() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.cuda.manual_seed.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.cuda.manual_seed.md index 9ac35208089..185fa5799d2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.cuda.manual_seed.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.cuda.manual_seed.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]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) ``` ### [paddle.seed](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/seed_cn.html) - ```python paddle.seed(seed) ``` @@ -15,7 +12,6 @@ paddle.seed(seed) 功能一致,返回类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |---------|--------------|----------------------------------------------------| | seed | seed | 表示设置的的随机种子(int)。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.equal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.equal.md index 7e634378c87..d1a376f53ad 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.equal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.equal.md @@ -1,13 +1,11 @@ ## [ 返回参数类型不一致 ]torch.equal ### [torch.equal](https://pytorch.org/docs/stable/generated/torch.equal.html?highlight=equal#torch.equal) - ```python torch.equal(input, other) ``` ### [paddle.equal_all](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/equal_all_cn.html#equal-all) - ```python paddle.equal_all(x, y, @@ -17,7 +15,6 @@ paddle.equal_all(x, 两者功能一致但返回参数类型不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.histc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.histc.md index 1dd7ad56c9e..a249b7a9647 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.histc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.histc.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]torch.histc - ### [torch.histc](https://pytorch.org/docs/stable/generated/torch.histc.html#torch-histc) - ```python torch.histc(input, bins=100, min=0, max=0, *, out=None) ``` ### [paddle.histogram](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/histogram_cn.html#histogram) - ```python paddle.histogram(input, bins=100, min=0, max=0, name=None) ``` @@ -15,7 +12,6 @@ paddle.histogram(input, bins=100, min=0, max=0, name=None) 其中 PyTorch 与 Paddle 的返回值类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------- | | input | input | 表示输入的 Tensor。 | @@ -26,9 +22,7 @@ paddle.histogram(input, bins=100, min=0, max=0, name=None) | 返回值 | 返回值 | 表示返回值,PyTorch 的返回值类型为 float32,Paddle 的返回值类型为 int64 , 需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.histc(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.cholesky_ex.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.cholesky_ex.md index 8481ebac585..61cd62bec71 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.cholesky_ex.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.cholesky_ex.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]torch.linalg.cholesky_ex - ### [torch.linalg.cholesky_ex](https://pytorch.org/docs/stable/generated/torch.linalg.cholesky_ex.html) - ```python torch.linalg.cholesky_ex(input, *, upper=False, check_errors=False, out=None) ``` ### [paddle.linalg.cholesky](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/cholesky_cn.html) - ```python paddle.linalg.cholesky(x, upper=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.cholesky(x, upper=False, name=None) 两者功能一致但返回参数类型不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | input | x | 表示输入参数为多维 Tensor,它的维度应该为 [*, M, N],其中*为零或更大的批次尺寸,并且最里面的两个维度上的矩阵都应为对称的正定矩阵,仅参数名不一致。 | @@ -25,9 +21,7 @@ paddle.linalg.cholesky(x, upper=False, name=None) | 返回值 | 返回值 | Pytorch 返回两个 out 与 info,Paddle 仅返回一个 Tensor:out,需转写。 | ### 转写示例 - #### 返回值 - ```python # PyTorch 写法 torch.linalg.cholesky_ex(x, upper=False) @@ -37,7 +31,6 @@ torch.linalg.cholesky_ex(x, upper=False) ``` #### out: 输出的 Tensor - ```python # PyTorch 写法 torch.linalg.cholesky_ex(x, upper=False, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.inv_ex.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.inv_ex.md index 79f03464f21..fd42b10155f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.inv_ex.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.inv_ex.md @@ -1,13 +1,10 @@ ## [ 返回参数类型不一致 ]torch.linalg.inv_ex - ### [torch.linalg.inv_ex](https://pytorch.org/docs/stable/generated/torch.linalg.inv_ex.html) - ```python torch.linalg.inv_ex(A, *, check_errors=False, out=None) ``` ### [paddle.linalg.inv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/inv_cn.html) - ```python paddle.linalg.inv(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.inv(x, name=None) 两者功能一致但返回参数类型不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | --------------------------------------------------------------------- | | A | x | 输入 Tensor,仅参数名不一致。 | @@ -24,9 +20,7 @@ paddle.linalg.inv(x, name=None) | 返回值 | 返回值 | Pytorch 返回两个 out 与 info,Paddle 仅返回一个 Tensor:out,需转写。 | ### 转写示例 - #### 返回值 - ```python # PyTorch 写法 torch.linalg.inv_ex(x) @@ -36,7 +30,6 @@ torch.linalg.inv_ex(x) ``` #### out 参数:输出的 Tensor - ```python # PyTorch 写法 torch.linalg.inv_ex(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.slogdet.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.slogdet.md index 6d06f903e1b..de2f7c5fa75 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.slogdet.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.linalg.slogdet.md @@ -1,12 +1,10 @@ ## [ 返回参数类型不一致 ]torch.linalg.slogdet ### [torch.linalg.slogdet](https://pytorch.org/docs/stable/generated/torch.linalg.slogdet.html#torch.linalg.slogdet) - ```python torch.linalg.slogdet(A, *, out=None) ``` ### [paddle.linalg.slogdet](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/slogdet_cn.html#slogdet) - ```python paddle.linalg.slogdet(x) ``` @@ -14,7 +12,6 @@ paddle.linalg.slogdet(x) 两者功能一致,返回参数个数不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | A | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -23,7 +20,6 @@ paddle.linalg.slogdet(x) ### 转写示例 - #### 返回值 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.max.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.max.md index 23e56d3111e..50de4c426ff 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.max.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.max.md @@ -4,7 +4,6 @@ ------------------------------------------------------------------------------------------------- ### [torch.max](https://pytorch.org/docs/stable/generated/torch.max.html?highlight=max#torch.max) - ```python torch.max(input, dim=None, @@ -14,7 +13,6 @@ torch.max(input, ``` ### [paddle.max](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/max_cn.html#max) - ```python paddle.max(x, axis=None, @@ -24,7 +22,6 @@ paddle.max(x, 其中 PyTorch 与 Paddle 指定 `dim` 后返回值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | @@ -58,7 +55,6 @@ result = paddle.max(a, axis=1), paddle.argmax(a, axis=1) -------------------------------------------------------------------------------------------------- ### [torch.max](https://pytorch.org/docs/stable/generated/torch.max.html?highlight=max#torch.max) - ```python torch.max(input, other, @@ -67,7 +63,6 @@ torch.max(input, ``` ### [paddle.maximum](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/minimum_cn.html#minimum) - ```python paddle.maximum(x, y, @@ -76,7 +71,6 @@ paddle.maximum(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.min.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.min.md index c58fac16139..70ff6d66932 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.min.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.min.md @@ -3,7 +3,6 @@ -------------------------------------------------------------------------------------------------- ### [torch.min](https://pytorch.org/docs/stable/generated/torch.min.html?highlight=min#torch.min) - ```python torch.min(input, dim=None, @@ -13,7 +12,6 @@ torch.min(input, ``` ### [paddle.min](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/min_cn.html#min) - ```python paddle.min(x, axis=None, @@ -23,7 +21,6 @@ paddle.min(x, 其中 PyTorch 与 Paddle 指定 `dim` 后返回值不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | @@ -56,7 +53,6 @@ result = torch.min(a, dim=1), torch.argmin(a, dim=1) -------------------------------------------------------------------------------------------------- ### [torch.min](https://pytorch.org/docs/stable/generated/torch.min.html?highlight=min#torch.min) - ```python torch.min(input, other, @@ -65,7 +61,6 @@ torch.min(input, ``` ### [paddle.minimum](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/minimum_cn.html#minimum) - ```python paddle.minimum(x, y, @@ -74,7 +69,6 @@ paddle.minimum(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.GRUCell.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.GRUCell.md index 31190ad5a20..48381a30908 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.GRUCell.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.GRUCell.md @@ -1,5 +1,4 @@ ## [ 返回参数类型不一致 ]torch.nn.GRUCell - ### [torch.nn.GRUCell](https://pytorch.org/docs/stable/generated/torch.nn.GRUCell.html#torch.nn.GRUCell) ```python torch.nn.GRUCell(input_size, hidden_size, bias=True, device=None, dtype=None) @@ -12,7 +11,6 @@ paddle.nn.GRUCell(input_size, hidden_size, weight_ih_attr=None, weight_hh_attr=N 两者功能一致但输入参数用法不一致,且返回参数个数不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input_size | input_size | 表示输入 x 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.LSTMCell.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.LSTMCell.md index 72c64c98a04..b91c2b3f6f4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.LSTMCell.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.LSTMCell.md @@ -11,7 +11,6 @@ paddle.nn.LSTMCell(input_size, hidden_size, weight_ih_attr=None, weight_hh_attr= 两者功能一致但输入参数用法不一致,且返回参数个数不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input_size | input_size | 表示输入 x 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.RNNCell.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.RNNCell.md index 891ae7f0884..9b0352ff3dc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.RNNCell.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.nn.RNNCell.md @@ -11,7 +11,6 @@ paddle.nn.SimpleRNNCell(input_size, hidden_size, activation='tanh', weight_ih_at 两者功能一致但输入参数用法不一致,且返回参数个数不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input_size | input_size | 表示输入 x 的大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.slogdet.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.slogdet.md index 761244a0839..3d6bff70b3d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.slogdet.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.slogdet.md @@ -1,12 +1,10 @@ ## [ 返回参数类型不一致 ]torch.slogdet ### [torch.slogdet](https://pytorch.org/docs/stable/generated/torch.slogdet.html?highlight=slogdet#torch.slogdet) - ```python torch.slogdet(input, *, out=None) ``` ### [paddle.linalg.slogdet](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/slogdet_cn.html#slogdet) - ```python paddle.linalg.slogdet(x) ``` @@ -14,7 +12,6 @@ paddle.linalg.slogdet(x) 两者功能一致,返回参数的个数不同,PyTorch 返回两个 Tesnor,Paddle 返回一个 Tensor,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +21,6 @@ paddle.linalg.slogdet(x) ### 转写示例 - #### 返回值 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.sort.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.sort.md index bafb6d9bb7f..6df3e2486fd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.sort.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.sort.md @@ -1,7 +1,5 @@ ## [ 返回参数类型不一致 ]torch.sort - ### [torch.sort](https://pytorch.org/docs/stable/generated/torch.sort.html?highlight=sort#torch.sort) - ```python torch.sort(input, dim=-1, @@ -12,7 +10,6 @@ torch.sort(input, ``` ### [paddle.sort](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sort_cn.html#paddle.sort) - ```python paddle.sort(x, axis=-1, @@ -24,7 +21,6 @@ paddle.sort(x, PyTorch 相比 Paddle 支持更多其他参数,同时两个 api 的返回参数类型不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.sparse.sum.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.sparse.sum.md index a6cfa36e958..afed0b5d136 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.sparse.sum.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.sparse.sum.md @@ -1,13 +1,10 @@ -## [ 返回参数类型不一致 ] torch.sparse.sum - +## [ 返回参数类型不一致 ]torch.sparse.sum ### [torch.sparse.sum](https://pytorch.org/docs/stable/generated/torch.sparse.sum.html?highlight=sparse+sum#torch.sparse.sum) - ```python torch.sparse.sum(input, dim=None, dtype=None) ``` ### [paddle.sparse.sum](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sparse/sum_cn.html#sum) - ```python paddle.sparse.sum(x, axis=None, dtype=None, keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.sparse.sum(x, axis=None, dtype=None, keepdim=False, name=None) 输入参数不一致和返回类型不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注| | -------- | ------------- | ------| | input | x| 输入的 Tensor,仅参数名不一致。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.triangular_solve.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.triangular_solve.md index d794d6d71b7..a933100c149 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.triangular_solve.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.triangular_solve.md @@ -1,13 +1,10 @@ -## [返回参数类型不一致]torch.triangular_solve - +## [ 返回参数类型不一致 ]torch.triangular_solve ### [torch.triangular_solve](https://pytorch.org/docs/stable/generated/torch.triangular_solve.html#torch.triangular_solve) - ```python torch.triangular_solve(input, A, upper=True, transpose=False, unitriangular=False, *, out=None) ``` ### [paddle.linalg.triangular_solve](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/triangular_solve_cn.html) - ```python paddle.linalg.triangular_solve(x, y, upper=True, transpose=False, unitriangular=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.triangular_solve(x, y, upper=True, transpose=False, unitriangular= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------- | ----------------------------------------------------------- | | input | y | 线性方程组左边的系数方阵,仅参数名不一致。 | @@ -33,8 +29,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.triangular_solve(b, A) # Paddle 写法: -## 注:Paddle 将 A 与 b 交换 -tuple(paddle.linalg.triangular_solve(A, b), A) +## 注:Paddle 将 A 与 b 交换 tuple(paddle.linalg.triangular_solve(A, b), A) ``` #### out 参数:输出的 Tensor diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.utils.data.default_collate.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.utils.data.default_collate.md index d074c98e663..e0563566a8b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.utils.data.default_collate.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/torch.utils.data.default_collate.md @@ -1,19 +1,16 @@ ## [ 返回参数类型不一致 ]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) ``` ### [paddle.io.dataloader.collate.default_collate_fn]() - ```python paddle.io.dataloader.collate.default_collate_fn(batch) ``` 返回参数类型不一致,需要转写。具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | batch | batch | 输入的用于组 batch 的数据。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/transformers.PreTrainedModel.generate.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/transformers.PreTrainedModel.generate.md index 526cfd4e0ab..a4f9b1ace3d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/transformers.PreTrainedModel.generate.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/transformers.PreTrainedModel.generate.md @@ -1,26 +1,21 @@ -## [返回参数类型不一致]transformers.PreTrainedModel.generate - +## [ 返回参数类型不一致 ]transformers.PreTrainedModel.generate ### [transformers.PreTrainedModel.generate](https://github.com/huggingface/transformers/blob/0fdea8607d7e01eb0e38a1ebeb7feee30a22f0cf/src/transformers/generation/utils.py#L1567) - ```python transformers.PreTrainedModel.generate(input, **kwargs) ``` ### [paddlenlp.transformers.PreTrainedModel.generate](https://github.com/PaddlePaddle/PaddleNLP/blob/88d4b19bc6865fb28c11d2ce83d07c3b4b8dc423/paddlenlp/generation/utils.py#L604) - ```python paddlenlp.transformers.PreTrainedModel.generate(input_ids, **kwargs) ``` ### 参数映射 - | transformers | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input_ids | token 的 id 组成的 Tensor,仅参数名不一致。。 | | 返回值 | 返回值 | PyTorch 返回类型为 Tensor,由 input 和生成的 ids(Tensor) 拼接而成,Paddle 返回类型为 tuple,由生成的 ids(Tensor) 和对应的 scores (Tensor)组成,需要转写。| ### 转写示例 - ```python # Pytorch 写法 res = transformers.PreTrainedModel.generate(input = input_x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/transformers.PreTrainedTokenizer.encode.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/transformers.PreTrainedTokenizer.encode.md index edf8fb66106..9cdad1e00b4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/transformers.PreTrainedTokenizer.encode.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/output_args_type_diff/transformers.PreTrainedTokenizer.encode.md @@ -1,26 +1,21 @@ -## [返回参数类型不一致]transformers.PreTrainedTokenizer.encode - +## [ 返回参数类型不一致 ]transformers.PreTrainedTokenizer.encode ### [transformers.PreTrainedTokenizer.encode](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer.encode) - ```python transformers.PreTrainedTokenizer.encode(text, **kwargs) ``` ### [paddlenlp.transformers.PreTrainedTokenizer.encode](https://github.com/PaddlePaddle/PaddleNLP/blob/88d4b19bc6865fb28c11d2ce83d07c3b4b8dc423/paddlenlp/transformers/tokenizer_utils_base.py#L2369) - ```python paddlenlp.transformers.PreTrainedTokenizer.encode(text, **kwargs) ``` ### 参数映射 - | transformers | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | text | text | 输入的编码文本。 | | 返回值 | 返回值 | PyTorch 返回 Tensor 类型,Paddle 返回类型为 `BatchEncoding`,是一种 dict-like 对象,key 包含 `input_ids`、`attention_mask` 等属性,需要转写。 | ### 转写示例 - ```python # Pytorch 写法 transformers.PreTrainedTokenizer.encode(text) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/flash_attn.ops.rms_norm.rms_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/flash_attn.ops.rms_norm.rms_norm.md index 37417d62cfa..b708d83afab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/flash_attn.ops.rms_norm.rms_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/flash_attn.ops.rms_norm.rms_norm.md @@ -1,13 +1,11 @@ -## [paddle 参数更多]flash_attn.ops.rms_norm.rms_norm +## [ paddle 参数更多 ]flash_attn.ops.rms_norm.rms_norm ### [flash_attn.ops.rms_norm.rms_norm](https://github.com/Dao-AILab/flash-attention/blob/d0787acc16c3667156b51ce5b01bdafc7594ed39/flash_attn/ops/rms_norm.py#L14) - ```python flash_attn.ops.rms_norm.rms_norm(x, weight, epsilon) ``` ### [paddle.incubate.nn.functional.fused_rms_norm](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/incubate/nn/functional/fused_rms_norm_cn.html) - ```python paddle.incubate.nn.functional.fused_rms_norm(x, norm_weight, norm_bias, epsilon, begin_norm_axis, bias=None, residual=None, quant_scale=- 1, quant_round_type=0, quant_max_bound=0, quant_min_bound=0) ``` @@ -15,7 +13,6 @@ paddle.incubate.nn.functional.fused_rms_norm(x, norm_weight, norm_bias, epsilon, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | flash_attn | PaddlePaddle | 备注 | | ----------------- | ----------------- | ------------------------------------------------------------ | | x | x | 输入 Tensor。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.argwhere.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.argwhere.md index 4428bbd7eee..2939c0d599c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.argwhere.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.argwhere.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.argwhere ### [torch.Tensor.argwhere](https://pytorch.org/docs/stable/generated/torch.Tensor.argwhere.html#torch.Tensor.argwhere) - ```python torch.Tensor.argwhere() ``` ### [paddle.Tensor.nonzero](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#nonzero-as-tuple-false) - ```python paddle.Tensor.nonzero(as_tuple=False) ``` @@ -14,7 +12,6 @@ paddle.Tensor.nonzero(as_tuple=False) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | as_tuple | 返回格式。是否以 1-D Tensor 构成的元组格式返回。 PyTorch 无此参数, Paddle 保持默认即可。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_left_shift.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_left_shift.md index bb10be9c733..f14635f4097 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_left_shift.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_left_shift.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.bitwise_left_shift - ### [torch.Tensor.bitwise_left_shift](https://pytorch.org/docs/stable/generated/torch.Tensor.bitwise_left_shift.html#torch-tensor-bitwise-left-shift) - ```python torch.Tensor.bitwise_left_shift(other) ``` ### [paddle.Tensor.bitwise_left_shift]() - ```python paddle.Tensor.bitwise_left_shift(y, is_arithmetic=True) ``` @@ -15,18 +12,7 @@ paddle.Tensor.bitwise_left_shift(y, is_arithmetic=True) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------- | ------------------------------------------------------------------- | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | | - | is_arithmetic | 用于表明是否执行算术位移, PyTorch 无此参数, Paddle 保持默认即可。 | - -### 转写示例 - -```python -# PyTorch 写法 -out = x.bitwise_left_shift(y) - -# Paddle 写法 -out = x.bitwise_left_shift(y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_left_shift_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_left_shift_.md index 0f2b244024a..5d1433c6a73 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_left_shift_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_left_shift_.md @@ -7,7 +7,6 @@ torch.Tensor.bitwise_left_shift_(other) ``` ### [paddle.Tensor.bitwise_left_shift_]() - ```python paddle.Tensor.bitwise_left_shift_(y, is_arithmetic=True) ``` @@ -15,18 +14,7 @@ paddle.Tensor.bitwise_left_shift_(y, is_arithmetic=True) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------- | ------------------------------------------------------------------- | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | | - | is_arithmetic | 用于表明是否执行算术位移, PyTorch 无此参数, Paddle 保持默认即可。 | - -### 转写示例 - -```python -# PyTorch 写法 -out = x.bitwise_left_shift_(y) - -# Paddle 写法 -out = x.bitwise_left_shift_(y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_right_shift.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_right_shift.md index f6951ca69f5..37007c9576a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_right_shift.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_right_shift.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.bitwise_right_shift - ### [torch.Tensor.bitwise_right_shift](https://pytorch.org/docs/stable/generated/torch.Tensor.bitwise_right_shift.html#torch-tensor-bitwise-right-shift) - ```python torch.Tensor.bitwise_right_shift(other) ``` ### [paddle.Tensor.bitwise_right_shift]() - ```python paddle.Tensor.bitwise_right_shift(y, is_arithmetic=True) ``` @@ -15,18 +12,7 @@ paddle.Tensor.bitwise_right_shift(y, is_arithmetic=True) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------- | ------------------------------------------------------------------- | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | | - | is_arithmetic | 用于表明是否执行算术位移, PyTorch 无此参数, Paddle 保持默认即可。 | - -### 转写示例 - -```python -# PyTorch 写法 -out = x.bitwise_right_shift(y) - -# Paddle 写法 -out = x.bitwise_right_shift(y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_right_shift_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_right_shift_.md index 0b0c66d154f..6f682676276 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_right_shift_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.bitwise_right_shift_.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.bitwise_right_shift_ - ### [torch.Tensor.bitwise_right_shift_](https://pytorch.org/docs/stable/generated/torch.Tensor.bitwise_right_shift_.html#torch-tensor-bitwise-right-shift) - ```python torch.Tensor.bitwise_right_shift_(other) ``` ### [paddle.Tensor.bitwise_right_shift_]() - ```python paddle.Tensor.bitwise_right_shift_(y, is_arithmetic=True) ``` @@ -15,18 +12,7 @@ paddle.Tensor.bitwise_right_shift_(y, is_arithmetic=True) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------- | ------------------------------------------------------------------- | | other | y | 表示输入的 Tensor ,仅参数名不一致。 | | - | is_arithmetic | 用于表明是否执行算术位移, PyTorch 无此参数, Paddle 保持默认即可。 | - -### 转写示例 - -```python -# PyTorch 写法 -out = x.bitwise_right_shift_(y) - -# Paddle 写法 -out = x.bitwise_right_shift_(y) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.count_nonzero.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.count_nonzero.md index 1b1ea8e4a9f..5e37c93450f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.count_nonzero.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.count_nonzero.md @@ -1,12 +1,10 @@ ## [ 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 torch.Tensor.count_nonzero(dim=None) ``` ### [paddle.Tensor.count_nonzero](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#count-nonzero-axis-none-keepdim-false-name-none) - ```python paddle.Tensor.count_nonzero(axis=None, keepdim=False, name=None) ``` @@ -14,7 +12,6 @@ paddle.Tensor.count_nonzero(axis=None, keepdim=False, name=None) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 表示进行运算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cov.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cov.md index 87ef33abdf5..6b377a8d3a6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cov.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cov.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.cov ### [torch.Tensor.cov](https://pytorch.org/docs/stable/generated/torch.Tensor.cov.html#torch.Tensor.cov) - ```python torch.Tensor.cov(*, correction=1, fweights=None, aweights=None) ``` ### [paddle.Tensor.cov]() - ```python paddle.Tensor.cov(rowvar=True, ddof=True, @@ -18,7 +16,6 @@ paddle.Tensor.cov(rowvar=True, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | correction | ddof | 样本量和样本自由度之间的差异, 若为 True ,返回无偏估计结果;若为 False ,返回普通平均值计算结果。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cummax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cummax.md index 5ce33be790b..83a753b8d7e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cummax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cummax.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.cummax - ### [torch.Tensor.cummax](https://pytorch.org/docs/stable/generated/torch.Tensor.cummax.html?highlight=cummax#torch.Tensor.cummax) - ```python torch.Tensor.cummax(dim) ``` ### [paddle.Tensor.cummax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#cummax-x-axis-none-dtype-int64-name-none) - ```python paddle.Tensor.cummax(axis=None, dtype=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.cummax(axis=None, dtype=None, name=None) 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------ | | dim | axis | 需要累加的维度,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cummin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cummin.md index 49f88d3219e..fdf8ba33e82 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cummin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.cummin.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.cummin - ### [torch.Tensor.cummin](https://pytorch.org/docs/stable/generated/torch.Tensor.cummin.html?highlight=cummin#torch.Tensor.cummin) - ```python torch.Tensor.cummin(dim) ``` ### [paddle.Tensor.cummin](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#cummin-x-axis-none-dtype-int64-name-none) - ```python paddle.Tensor.cummin(axis=None, dtype=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.cummin(axis=None, dtype=None, name=None) 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------ | | dim | axis | 需要累加的维度,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fill_diagonal_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fill_diagonal_.md index fb6c5804269..bdcd5e49b95 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fill_diagonal_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fill_diagonal_.md @@ -1,13 +1,10 @@ ## [ 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_) - ```python torch.Tensor.fill_diagonal_(fill_value, wrap=False) ``` ### [paddle.Tensor.fill_diagonal_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#fill-diagonal-x-value-offset-0-wrap-false-name-none) - ```python paddle.Tensor.fill_diagonal_(value, offset=0, wrap=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.fill_diagonal_(value, offset=0, wrap=False, name=None) 两者功能一致且参数用法一致,paddle 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------- | | fill_value | value | 以输入 value 值修改原始 Tensor 对角线元素,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fliplr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fliplr.md index cee3de4ddc4..97e5c33bc7f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fliplr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.fliplr.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.fliplr - ### [torch.Tensor.fliplr](https://pytorch.org/docs/stable/generated/torch.Tensor.fliplr.html?highlight=fliplr#torch.Tensor.fliplr) - ```python torch.Tensor.fliplr() ``` ### [paddle.Tensor.flip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#flip-axis-name-none) - ```python paddle.Tensor.flip(axis, name=None) ``` @@ -15,13 +12,11 @@ paddle.Tensor.flip(axis, name=None) 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------------- | | - | axis | 指定进行翻转的轴,PyTorch 无此参数,Paddle 中可以指定 `axis=1` 来对应 PyTorch。| ### 转写示例 - ```Python # torch 版本直接向左/右翻转张量 torch_x = torch.randn(3, 4) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.flipud.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.flipud.md index 85c4c89bf7e..d7260ddb3cc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.flipud.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.flipud.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.flipud - ### [torch.Tensor.flipud](https://pytorch.org/docs/stable/generated/torch.Tensor.flipud.html?highlight=flipud#torch.Tensor.flipud) - ```python torch.Tensor.flipud() ``` ### [paddle.Tensor.flip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#flip-axis-name-none) - ```python paddle.Tensor.flip(axis, name=None) ``` @@ -15,13 +12,11 @@ paddle.Tensor.flip(axis, name=None) 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------------- | | - | axis | 指定进行翻转的轴,PyTorch 无此参数,Paddle 中可以指定 `axis=0` 来对应 PyTorch。| ### 转写示例 - ```Python # torch 版本直接向上/下翻转张量 torch_x = torch.randn(3, 4) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.logcumsumexp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.logcumsumexp.md index 9d00da784e3..4593351f263 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.logcumsumexp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.logcumsumexp.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.logcumsumexp - ### [torch.Tensor.logcumsumexp](https://pytorch.org/docs/stable/generated/torch.Tensor.logcumsumexp.html?highlight=logcumsumexp#torch.Tensor.logcumsumexp) - ```python torch.Tensor.logcumsumexp(dim) ``` ### [paddle.Tensor.logcumsumexp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/logcumsumexp_cn.html#logcumsumexp) - ```python paddle.Tensor.logcumsumexp(axis=None, dtype=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.logcumsumexp(axis=None, dtype=None, name=None) 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | | dim | axis | 指明需要计算的维,仅参数名不一致。 paddle 中默认 None。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.lu_solve.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.lu_solve.md index 474d575fb5f..01a42879dd6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.lu_solve.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.lu_solve.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.lu_solve - ### [torch.Tensor.lu_solve](https://pytorch.org/docs/stable/generated/torch.Tensor.lu_solve.html#torch-tensor-lu-solve) - ```python torch.Tensor.lu_solve(LU_data, LU_pivots) ``` ### [paddle.linalg.lu_solve](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/lu_solve_cn.html) - ```python paddle.linalg.lu_solve(b, lu, pivots, trans="N", name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.lu_solve(b, lu, pivots, trans="N", name=None) Pytorch 为 Tensor 类方法,Paddle 为普通函数,另外 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | self | b | 表示欲进行线性方程组求解的右值 Tensor ,调用 torch.Tensor 类方法的 self Tensor 传入。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.median.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.median.md index 832ae08f337..2a99a721e35 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.median.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.median.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.median - ### [torch.Tensor.median](https://pytorch.org/docs/stable/generated/torch.Tensor.median.html) - ```python torch.Tensor.median(dim=None, keepdim=False) ``` ### [paddle.Tensor.median](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#median-axis-none-keepdim-false-name-none) - ```python paddle.Tensor.median(axis=None, keepdim=False, mode='avg', name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.median(axis=None, keepdim=False, mode='avg', name=None) Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | dim | axis | 指定对 x 进行计算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.nanmedian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.nanmedian.md index 3664a96b5b9..c95713e77bf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.nanmedian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.nanmedian.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.nanmedian - ### [torch.Tensor.nanmedian](https://pytorch.org/docs/stable/generated/torch.Tensor.nanmedian.html) - ```python torch.Tensor.nanmedian(dim=None, keepdim=False) ``` ### [paddle.Tensor.nanmedian](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#nanmedian-axis-none-keepdim-true-name-none) - ```python paddle.Tensor.nanmedian(axis=None, keepdim=False, mode='avg', name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.nanmedian(axis=None, keepdim=False, mode='avg', name=None) Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | dim | axis | 指定对 x 进行计算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.pinverse.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.pinverse.md index 97ba4cc5b2d..f369799e075 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.pinverse.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.pinverse.md @@ -1,12 +1,11 @@ ## [ paddle 参数更多 ]torch.Tensor.pinverse -### [torch.Tensor.pinverse](https://pytorch.org/docs/stable/generated/torch.Tensor.pinverse.html#torch.Tensor.pinverse) +### [torch.Tensor.pinverse](https://pytorch.org/docs/stable/generated/torch.Tensor.pinverse.html#torch.Tensor.pinverse) ```python torch.Tensor.pinverse() ``` ### [paddle.Tensor.pinv]() - ```python paddle.Tensor.pinv(rcond=1e-15, hermitian=False, @@ -16,7 +15,6 @@ paddle.Tensor.pinv(rcond=1e-15, 其中 Paddle 相比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | rcond | 奇异值(特征值)被截断的阈值,PyTorch 无此参数,Paddle 保持默认即可。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.take.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.take.md index 60ca27952de..e6021cf01ac 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.take.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.take.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.Tensor.take - +## [ paddle 参数更多 ]torch.Tensor.take ### [torch.Tensor.take](https://pytorch.org/docs/stable/generated/torch.Tensor.take.html#torch.Tensor.take) - ```python torch.Tensor.take(index) ``` ### [paddle.Tensor.take](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#take-index-mode-raise-name-none) - ```python paddle.Tensor.take(index, mode='raise', name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.take(index, mode='raise', name=None) 两者功能一致,仅参数名不一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------ | | index | index | 表示输入 tensor 的索引,参数完全一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.to_sparse_coo.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.to_sparse_coo.md index 739d6833be8..4389e05169f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.to_sparse_coo.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.to_sparse_coo.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.to_sparse_coo - ### [torch.Tensor.to_sparse_coo](https://pytorch.org/docs/stable/generated/torch.Tensor.to_sparse_coo.html) - ```python torch.Tensor.to_sparse_coo() ``` ### [paddle.Tensor.to_sparse_coo]() - ```python paddle.Tensor.to_sparse_coo(sparse_dim) ``` @@ -16,7 +13,6 @@ paddle.Tensor.to_sparse_coo(sparse_dim) ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------- | | - | sparse_dim | 在新的稀疏张量中包含的稀疏维度的数量,pytorch 中无此参数,paddle 令其为 tensor 输入维度即可。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.uniform_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.uniform_.md index af2554d7b95..174b2d45dde 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.uniform_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.uniform_.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.uniform_ - ### [torch.Tensor.uniform_](https://pytorch.org/docs/stable/generated/torch.Tensor.uniform_.html#torch-tensor-uniform) - ```python torch.Tensor.uniform_(from=0, to=1) ``` ### [paddle.Tensor.uniform_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#uniform-min-1-0-max-1-0-seed-0-name-none) - ```python paddle.Tensor.uniform_(min=- 1.0, max=1.0, seed=0, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.uniform_(min=- 1.0, max=1.0, seed=0, name=None) Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------ | | from | min | 表示生成元素的起始位置,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.unique_consecutive.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.unique_consecutive.md index a5a38f25bd0..0364444252e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.unique_consecutive.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.Tensor.unique_consecutive.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.Tensor.unique_consecutive - ### [torch.Tensor.unique_consecutive](https://pytorch.org/docs/stable/generated/torch.Tensor.unique_consecutive.html#torch.Tensor.unique_consecutive) - ```python torch.Tensor.unique_consecutive(return_inverse=False, return_counts=False, dim=None) ``` ### [paddle.Tensor.unique_consecutive]() - ```python paddle.Tensor.unique_consecutive(return_inverse=False, return_counts=False, axis=None, dtype='int64', name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.unique_consecutive(return_inverse=False, return_counts=False, axis Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | -------------- | ------------------------------------------------------------ | | return_inverse | return_inverse | 表示输入 Tensor 的元素对应在连续不重复元素中的索引。参数完全一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.autograd.Function.backward.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.autograd.Function.backward.md index ec74c85b8d1..e594bc2fde3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.autograd.Function.backward.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.autograd.Function.backward.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.autograd.Function.backward - ### [torch.autograd.Function.backward](https://pytorch.org/docs/stable/generated/torch.autograd.Function.backward.html#torch.autograd.Function.backward) - ```python torch.autograd.Function.backward(ctx, *grad_outputs) ``` ### [paddle.autograd.PyLayer.backward](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/autograd/PyLayer_cn.html#backward-ctx-args-kwargs) - ```python paddle.autograd.PyLayer.backward(ctx, *args, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.autograd.PyLayer.backward(ctx, *args, **kwargs) Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------------- | | ctx | ctx | 上下文对象。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.autograd.profiler.profile.export_chrome_trace.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.autograd.profiler.profile.export_chrome_trace.md index d72e43c9667..91bf4495bde 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.autograd.profiler.profile.export_chrome_trace.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.autograd.profiler.profile.export_chrome_trace.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.autograd.profiler.profile.export_chrome_trace - ### [torch.autograd.profiler.profile.export_chrome_trace](https://pytorch.org/docs/stable/generated/torch.autograd.profiler.profile.export_chrome_trace.html#torch.autograd.profiler.profile.export_chrome_trace) - ```python torch.autograd.profiler.profile.export_chrome_trace(path) ``` ### [paddle.profiler.export_chrome_tracing](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/profiler/export_chrome_tracing_cn.html) - ```python paddle.profiler.export_chrome_tracing(dir_name: str, worker_name: Optional[str] = None) ``` @@ -15,7 +12,6 @@ paddle.profiler.export_chrome_tracing(dir_name: str, worker_name: Optional[str] Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------- | | path | dir_name | 性能数据导出所保存到的文件夹路径,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.bitwise_left_shift.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.bitwise_left_shift.md index 8e7926fa3f2..9a99523945d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.bitwise_left_shift.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.bitwise_left_shift.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.bitwise_left_shift - ### [torch.bitwise_left_shift](https://pytorch.org/docs/stable/generated/torch.bitwise_left_shift.html) - ```python torch.bitwise_left_shift(input, other, *, out=None) ``` ### [paddle.bitwise_left_shift](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/bitwise_left_shift_cn.html#bitwise-left-shift) - ```python paddle.bitwise_left_shift(x, y, is_arithmetic=True, out=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.bitwise_left_shift(x, y, is_arithmetic=True, out=None, name=None) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------- | ------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.bitwise_right_shift.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.bitwise_right_shift.md index c301fc5a992..009e0cff744 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.bitwise_right_shift.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.bitwise_right_shift.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.bitwise_right_shift - ### [torch.bitwise_right_shift](https://pytorch.org/docs/stable/generated/torch.bitwise_right_shift.html) - ```python torch.bitwise_right_shift(input, other, *, out=None) ``` ### [paddle.bitwise_right_shift](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/bitwise_right_shift_cn.html#bitwise-right-shift) - ```python paddle.bitwise_right_shift(x, y, is_arithmetic=True, out=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.bitwise_right_shift(x, y, is_arithmetic=True, out=None, name=None) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------- | ------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.count_nonzero.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.count_nonzero.md index 987bd763a01..7fcce9ae307 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.count_nonzero.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.count_nonzero.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.count_nonzero ### [torch.count_nonzero](https://pytorch.org/docs/stable/generated/torch.count_nonzero.html?highlight=count_nonzero#torch.count_nonzero) - ```python torch.count_nonzero(input, dim=None) ``` ### [paddle.count_nonzero](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/count_nonzero_cn.html#count-nonzero) - ```python paddle.count_nonzero(x, axis=None, @@ -17,7 +15,6 @@ paddle.count_nonzero(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cov.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cov.md index 835ed0e36c2..01a6f8a7a62 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cov.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cov.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]torch.cov ### [torch.cov](https://pytorch.org/docs/stable/generated/torch.cov.html?highlight=cov#torch.cov) - ```python torch.cov(input, correction=1, @@ -9,7 +8,6 @@ torch.cov(input, ``` ### [paddle.linalg.cov](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/cov_cn.html#cov) - ```python paddle.linalg.cov(x, rowvar=True, @@ -22,7 +20,6 @@ paddle.linalg.cov(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cpu.amp.autocast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cpu.amp.autocast.md index 31f1aa9b8c1..222516f712e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cpu.amp.autocast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cpu.amp.autocast.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.cpu.amp.autocast - ### [torch.cpu.amp.autocast](https://pytorch.org/docs/stable/amp.html?highlight=autocast#torch.cpu.amp.autocast) - ```python torch.cpu.amp.autocast(enabled=True, dtype=torch.bfloat16, cache_enabled=True) ``` ### [paddle.amp.auto_cast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/auto_cast_cn.html) - ```python paddle.amp.auto_cast(enable=True, custom_white_list=None, custom_black_list=None, level='O1', dtype='float16', use_promote=True) ``` @@ -15,7 +12,6 @@ paddle.amp.auto_cast(enable=True, custom_white_list=None, custom_black_list=None 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | enabled | enable | 是否开启自动混合精度。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.BoolTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.BoolTensor.md index fbaf4e3ce96..5175562ca82 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.BoolTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.BoolTensor.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.cuda.BoolTensor - +## [ paddle 参数更多 ]torch.cuda.BoolTensor ### [torch.cuda.BoolTensor](https://pytorch.org/docs/stable/tensors.html) - ```python torch.cuda.BoolTensor(data) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype='bool', place='gpu', stop_gradient=True) ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype='bool', place='gpu', stop_gradient=True) Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------- | | data | data | 要转换的数据。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.ByteTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.ByteTensor.md index 914eb37cbbf..47b33e9795b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.ByteTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.ByteTensor.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.cuda.ByteTensor - +## [ paddle 参数更多 ]torch.cuda.ByteTensor ### [torch.cuda.ByteTensor](https://pytorch.org/docs/stable/tensors.html) - ```python torch.cuda.ByteTensor(data) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype='uint8', place='gpu', stop_gradient=True) ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype='uint8', place='gpu', stop_gradient=True) Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------- | | data | data | 要转换的数据。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.DoubleTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.DoubleTensor.md index 00a72e2893e..5f50ddb048b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.DoubleTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.DoubleTensor.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.cuda.DoubleTensor - +## [ paddle 参数更多 ]torch.cuda.DoubleTensor ### [torch.cuda.DoubleTensor](https://pytorch.org/docs/stable/tensors.html) - ```python torch.cuda.DoubleTensor(data) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype='float64', place='gpu') ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype='float64', place='gpu') Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------- | | - | dtype | Tensor 的数据类型,PyTorch 无此参数,Paddle 需设置为 'float64'。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.FloatTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.FloatTensor.md index af9960b9bae..54083086de2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.FloatTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.FloatTensor.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.cuda.FloatTensor - +## [ paddle 参数更多 ]torch.cuda.FloatTensor ### [torch.cuda.FloatTensor](https://pytorch.org/docs/stable/tensors.html) - ```python torch.cuda.FloatTensor(data) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype='float32', place='gpu', stop_gradient=True) ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype='float32', place='gpu', stop_gradient=True) Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------- | | data | data | 要转换的数据。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.HalfTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.HalfTensor.md index c47910178dd..4a45f25c77f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.HalfTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.HalfTensor.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.cuda.HalfTensor - +## [ paddle 参数更多 ]torch.cuda.HalfTensor ### [torch.cuda.HalfTensor](https://pytorch.org/docs/stable/tensors.html) - ```python torch.cuda.HalfTensor(data) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype='float16', place='gpu') ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype='float16', place='gpu') Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | |---------| ------------ |--------------------------------------------------| | - | dtype | Tensor 的数据类型,PyTorch 无此参数,Paddle 需设置为 'float16'。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.IntTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.IntTensor.md index cdb69b55670..13bb9a656d9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.IntTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.IntTensor.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.cuda.IntTensor - +## [ paddle 参数更多 ]torch.cuda.IntTensor ### [torch.cuda.IntTensor](https://pytorch.org/docs/stable/tensors.html) - ```python torch.cuda.IntTensor(data) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype='int32', place='gpu', stop_gradient=True) ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype='int32', place='gpu', stop_gradient=True) Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------- | | data | data | 要转换的数据。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.LongTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.LongTensor.md index 5a8e3d1498f..db08f556cb2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.LongTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.LongTensor.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.cuda.LongTensor - +## [ paddle 参数更多 ]torch.cuda.LongTensor ### [torch.cuda.LongTensor](https://pytorch.org/docs/stable/tensors.html) - ```python torch.cuda.LongTensor(data) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype='int64', place='gpu', stop_gradient=True) ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype='int64', place='gpu', stop_gradient=True) Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------- | | data | data | 要转换的数据。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.ShortTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.ShortTensor.md index 022ce4bc3f7..647bd778d51 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.ShortTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.ShortTensor.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.cuda.ShortTensor - +## [ paddle 参数更多 ]torch.cuda.ShortTensor ### [torch.cuda.ShortTensor](https://pytorch.org/docs/stable/tensors.html) - ```python torch.cuda.ShortTensor(data) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype='int16', place='gpu') ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype='int16', place='gpu') Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------- | | - | dtype | Tensor 的数据类型,PyTorch 无此参数,Paddle 需设置为 'int16'。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.amp.autocast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.amp.autocast.md index 89ef19f9579..9596435c0c1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.amp.autocast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.cuda.amp.autocast.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.cuda.amp.autocast - ### [torch.cuda.amp.autocast](https://pytorch.org/docs/stable/amp.html#torch.cuda.amp.autocast) - ```python torch.cuda.amp.autocast(enabled=True, dtype=torch.float16, cache_enabled=True) ``` ### [paddle.amp.auto_cast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/auto_cast_cn.html) - ```python paddle.amp.auto_cast(enable=True, custom_white_list=None, custom_black_list=None, level='O1', dtype='float16', use_promote=True) ``` @@ -15,7 +12,6 @@ paddle.amp.auto_cast(enable=True, custom_white_list=None, custom_black_list=None 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ----------------- | ------------------------------------------------------------ | | enabled | enable | 是否开启自动混合精度。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.fliplr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.fliplr.md index 1813bdfe08f..505ae468a52 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.fliplr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.fliplr.md @@ -1,12 +1,11 @@ ## [ paddle 参数更多 ]torch.fliplr -### [torch.fliplr](https://pytorch.org/docs/stable/generated/torch.fliplr.html?highlight=fliplr#torch.fliplr) +### [torch.fliplr](https://pytorch.org/docs/stable/generated/torch.fliplr.html?highlight=fliplr#torch.fliplr) ```python torch.fliplr(input) ``` ### [paddle.flip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/flip_cn.html#flip) - ```python paddle.flip(x, axis, @@ -15,7 +14,6 @@ paddle.flip(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.flipud.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.flipud.md index e59f6f47e78..3b244c40078 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.flipud.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.flipud.md @@ -1,19 +1,16 @@ ## [ paddle 参数更多 ]torch.flipud ### [torch.flipud](https://pytorch.org/docs/stable/generated/torch.flipud.html?highlight=flipud#torch.flipud) - ```python torch.flipud(input) ``` ### [paddle.flip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/flip_cn.html#flip) - ```python paddle.flip(x, axis, name=None) ``` 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.linalg.vander.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.linalg.vander.md index ab9376bcf1d..4b6f437a609 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.linalg.vander.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.linalg.vander.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.linalg.vander - ### [torch.linalg.vander](https://pytorch.org/docs/stable/generated/torch.linalg.vander.html#torch.linalg.vander) - ```python torch.linalg.vander(x, N=None) ``` ### [paddle.vander](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vander_cn.html) - ```python paddle.vander(x, n=None, increasing=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.vander(x, n=None, increasing=False, name=None) 其中 Paddle 相比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------ | | x | x | 输入的 Tensor。 | @@ -23,9 +19,7 @@ paddle.vander(x, n=None, increasing=False, name=None) | - | increasing | 列的幂次顺序,PyTorch 无此参数,Paddle 设置为 True,需要转写。 | ### 转写示例 - #### increasing:列的幂次顺序 - ```python # PyTorch 写法 torch.linalg.vander(x) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nansum.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nansum.md index 0a7461f66f6..786805016d6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nansum.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nansum.md @@ -1,13 +1,10 @@ -## [ paddle 参数更多 ] torch.nansum - +## [ paddle 参数更多 ]torch.nansum ### [torch.nansum](https://pytorch.org/docs/stable/generated/torch.nansum.html) - ```python torch.nansum(input, *, dtype=None) ``` ### [paddle.nansum](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nansum_cn.html) - ```python paddle.nansum(x, axis=None, dtype=None, keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.nansum(x, axis=None, dtype=None, keepdim=False, name=None) Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | ----------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,数据类型为:float16、float32、float64、int32 或 int64。仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.AdaptiveAvgPool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.AdaptiveAvgPool2d.md index 555ae4b5b27..53552fdcef8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.AdaptiveAvgPool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.AdaptiveAvgPool2d.md @@ -1,20 +1,16 @@ -## [ paddle 参数更多 ] torch.nn.AdaptiveAvgPool2d - +## [ paddle 参数更多 ]torch.nn.AdaptiveAvgPool2d ### [torch.nn.AdaptiveAvgPool2d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveAvgPool2d.html) - ```python torch.nn.AdaptiveAvgPool2d(output_size) ``` ### [paddle.nn.AdaptiveAvgPool2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/AdaptiveAvgPool2D_cn.html#adaptiveavgpool2d) - ```python paddle.nn.AdaptiveAvgPool2D(output_size, data_format='NCHW', name=None) ``` 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | output_size | output_size | 表示输出 Tensor 的 size 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.AdaptiveAvgPool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.AdaptiveAvgPool3d.md index cbcadb20575..8459b547372 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.AdaptiveAvgPool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.AdaptiveAvgPool3d.md @@ -1,20 +1,16 @@ -## [ paddle 参数更多 ] torch.nn.AdaptiveAvgPool3d - +## [ paddle 参数更多 ]torch.nn.AdaptiveAvgPool3d ### [torch.nn.AdaptiveAvgPool3d](https://pytorch.org/docs/stable/generated/torch.nn.AdaptiveAvgPool3d.html) - ```python torch.nn.AdaptiveAvgPool3d(output_size) ``` ### [paddle.nn.AdaptiveAvgPool3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/AdaptiveAvgPool3D_cn.html#adaptiveavgpool3d) - ```python paddle.nn.AdaptiveAvgPool3D(output_size, data_format='NCDHW', name=None) ``` 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | output_size | output_size | 表示输出 Tensor 的 size 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.CircularPad3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.CircularPad3d.md index 9d74a250b16..6ba7640282b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.CircularPad3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.CircularPad3d.md @@ -1,20 +1,16 @@ ## [ paddle 参数更多 ]torch.nn.CircularPad3d - ### [torch.nn.CircularPad3d](https://pytorch.org/docs/stable/generated/torch.nn.CircularPad3d.html#circularpad3d) - ```python torch.nn.CircularPad3d(padding) ``` ### [paddle.nn.Pad3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Pad3D_cn.html#pad3d) - ```python paddle.nn.Pad3D(padding, mode='constant', value=0.0, data_format='NCDHW', name=None) ``` 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ---------------------------------------------------------------------------- | | padding | padding | 填充大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad1d.md index 00da0cdf0f3..1dd5258dc33 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad1d.md @@ -1,13 +1,11 @@ ## [ paddle 参数更多 ]torch.nn.ConstantPad1d ### [torch.nn.ConstantPad1d](https://pytorch.org/docs/stable/generated/torch.nn.ConstantPad1d.html?highlight=constantpad1d#torch.nn.ConstantPad1d) - ```python torch.nn.ConstantPad1d(padding, value) ``` ### [paddle.nn.Pad1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Pad1D_cn.html#pad1d) - ```python paddle.nn.Pad1D(padding, mode='constant', @@ -16,24 +14,11 @@ paddle.nn.Pad1D(padding, name=None) ``` -其中 Paddle 和 PyTorch 的 padding 参数所支持的类型不一致,具体如下: +其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| padding | padding | 填充大小,PyTorch 和 Paddle 的 padding 参数的类型分别为 (int/tuple) 和 (int/Tensor/list)。 | +| padding | padding | 填充大小 | | value | value | 以 'constant' 模式填充区域时填充的值。默认值为 0.0 。 | | - | mode | padding 的四种模式,PyTorch 无此参数,Paddle 保持默认即可。 | | - | data_format | 输入和输出的数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | - -### 转写示例 -#### padding:填充大小 -```python -# PyTorch 写法 -m = nn.ConstantPad1d((3, 1), 3.5) -m(input) - -# Paddle 写法 -m = nn.Pad1D([3, 1], value=3.5) -m(input) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad2d.md index 8371c066f18..69f38bb92e0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad2d.md @@ -14,24 +14,11 @@ paddle.nn.Pad2D(padding, name=None) ``` -其中 Paddle 和 PyTorch 的 padding 参数所支持的类型不一致,具体如下: +其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| padding | padding | 填充大小,PyTorch 和 Paddle 的 padding 参数的类型分别为 (int/tuple) 和 (int/Tensor/list)。 | +| padding | padding | 填充大小| | value | value | 以 'constant' 模式填充区域时填充的值。默认值为 0.0 。 | | - | mode | padding 的四种模式,PyTorch 无此参数,Paddle 保持默认即可。 | | - | data_format | 输入和输出的数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | - -### 转写示例 -#### padding:填充大小 -```python -# PyTorch 写法 -m = nn.ConstantPad2d((3, 1), 3.5) -m(input) - -# Paddle 写法 -m = nn.Pad2D([3, 1], value=3.5) -m(input) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad3d.md index 54d4577441f..427814105ab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ConstantPad3d.md @@ -14,24 +14,11 @@ paddle.nn.Pad3D(padding, name=None) ``` -其中 Paddle 和 PyTorch 的 padding 参数所支持的类型不一致,具体如下: +其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| padding | padding | 填充大小,PyTorch 和 Paddle 的 padding 参数的类型分别为 (int/tuple) 和 (int/Tensor/list)。 | +| padding | padding | 填充大小| | value | value | 以 'constant' 模式填充区域时填充的值。默认值为 0.0 。 | | - | mode | padding 的四种模式,PyTorch 无此参数,Paddle 保持默认即可。 | | - | data_format | 输入和输出的数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | - -### 转写示例 -#### padding:填充大小 -```python -# PyTorch 写法 -m = nn.ConstantPad3d((3, 1), 3.5) -m(input) - -# Paddle 写法 -m = nn.Pad3D([3, 1], value=3.5) -m(input) -``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LPPool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LPPool1d.md index b711db7f6a6..a06a1ef89a3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LPPool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LPPool1d.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.LPPool1d - ### [torch.nn.LPPool1d](https://pytorch.org/docs/stable/generated/torch.nn.LPPool1d.html#lppool1d) - ```python torch.nn.LPPool1d(norm_type, kernel_size, stride=None, ceil_mode=False) ``` @@ -14,7 +12,6 @@ paddle.nn.LPPool1D(norm_type, kernel_size, stride=None, padding=0, ceil_mode=Fal 其中 Paddle 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | norm_type | norm_type | 幂平均池化的指数,不可以为 0 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LPPool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LPPool2d.md index dcd3ff7c47a..cc8beebd239 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LPPool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LPPool2d.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.LPPool2d - ### [torch.nn.LPPool2d](https://pytorch.org/docs/stable/generated/torch.nn.LPPool2d.html#lppool2d) - ```python torch.nn.LPPool2d(norm_type, kernel_size, stride=None, ceil_mode=False) ``` @@ -14,7 +12,6 @@ paddle.nn.LPPool2D(norm_type, kernel_size, stride=None, padding=0, ceil_mode=Fal 其中 Paddle 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | norm_type | norm_type | 幂平均池化的指数,不可以为 0 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm1d.md index 1aecc96b37b..fd17869e25d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm1d.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.LazyBatchNorm1d ### [torch.nn.LazyBatchNorm1d](https://pytorch.org/docs/stable/generated/torch.nn.LazyBatchNorm1d.html) - ```python torch.nn.LazyBatchNorm1d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None) ``` ### [paddle.nn.BatchNorm1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/BatchNorm1D_cn.html#batchnorm1d) - ```python paddle.nn.BatchNorm1D(num_features, momentum=0.9, @@ -20,7 +18,6 @@ paddle.nn.BatchNorm1D(num_features, 其中,Paddle 不支持 `num_features` 参数的延迟初始化,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | num_features | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -35,9 +32,7 @@ paddle.nn.BatchNorm1D(num_features, | dtype | - | 指定权重参数属性的对象,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - -#### num_features: 输入通道数 -在 PyTorch 中,使用 `LazyBatchNorm1d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `BatchNorm1D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### num_features: 输入通道数在 PyTorch 中,使用 `LazyBatchNorm1d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `BatchNorm1D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 bn = torch.nn.LazyBatchNorm1d() @@ -79,7 +74,6 @@ m = paddle.nn.BatchNorm1D(num_features=24, momentum=0.8) # num_features 需要 ``` #### track_running_stats:指示是否使用全局均值和方差 - ```python track_running_stats=None 时: # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm2d.md index ae7f61ef18e..bd103c28164 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm2d.md @@ -1,12 +1,11 @@ ## [ paddle 参数更多 ]torch.nn.LazyBatchNorm2d -### [torch.nn.LazyBatchNorm2d](https://pytorch.org/docs/stable/generated/torch.nn.LazyBatchNorm2d.html) +### [torch.nn.LazyBatchNorm2d](https://pytorch.org/docs/stable/generated/torch.nn.LazyBatchNorm2d.html) ```python torch.nn.LazyBatchNorm2d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None) ``` ### [paddle.nn.BatchNorm2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/BatchNorm2D_cn.html#batchnorm2d) - ```python paddle.nn.BatchNorm2D(num_features, momentum=0.9, @@ -20,7 +19,6 @@ paddle.nn.BatchNorm2D(num_features, 其中,Paddle 不支持 `num_features` 参数的延迟初始化,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | num_features | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -35,9 +33,7 @@ paddle.nn.BatchNorm2D(num_features, | dtype | - | 指定权重参数属性的对象,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - -#### num_features: 输入通道数 -在 PyTorch 中,使用 `LazyBatchNorm2d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `BatchNorm2D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### num_features: 输入通道数在 PyTorch 中,使用 `LazyBatchNorm2d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `BatchNorm2D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 bn = torch.nn.LazyBatchNorm2d() @@ -79,7 +75,6 @@ m = paddle.nn.BatchNorm2D(num_features=24, momentum=0.8) # num_features 需要 ``` #### track_running_stats:指示是否使用全局均值和方差 - ```python track_running_stats=None 时: # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm3d.md index 7655fd1929b..1639f5519b1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyBatchNorm3d.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.LazyBatchNorm3d ### [torch.nn.LazyBatchNorm3d](https://pytorch.org/docs/stable/generated/torch.nn.LazyBatchNorm3d.html) - ```python torch.nn.LazyBatchNorm3d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None) ``` ### [paddle.nn.BatchNorm3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/BatchNorm3D_cn.html#batchnorm3d) - ```python paddle.nn.BatchNorm3D(num_features, momentum=0.9, @@ -20,7 +18,6 @@ paddle.nn.BatchNorm3D(num_features, 其中,Paddle 不支持 `num_features` 参数的延迟初始化,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | num_features | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -35,9 +32,7 @@ paddle.nn.BatchNorm3D(num_features, | dtype | - | 指定权重参数属性的对象,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - -#### num_features: 输入通道数 -在 PyTorch 中,使用 `LazyBatchNorm3d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `BatchNorm3D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### num_features: 输入通道数在 PyTorch 中,使用 `LazyBatchNorm3d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `BatchNorm3D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 bn = torch.nn.LazyBatchNorm3d() @@ -79,7 +74,6 @@ m = paddle.nn.BatchNorm3D(num_features=24, momentum=0.8) # num_features 需要 ``` #### track_running_stats:指示是否使用全局均值和方差 - ```python track_running_stats=None 时: # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv1d.md index 2d9fa20e89e..e7cba938b9a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv1d.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.LazyConv1d ### [torch.nn.LazyConv1d](https://pytorch.org/docs/stable/generated/torch.nn.LazyConv1d.html) - ```python torch.nn.LazyConv1d(out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None) ``` ### [paddle.nn.Conv1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Conv1D_cn.html#conv1d) - ```python paddle.nn.Conv1D(in_channels, out_channels, @@ -23,7 +21,6 @@ paddle.nn.Conv1D(in_channels, 其中,Paddle 不支持 `in_channels` 参数的延迟初始化,PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | in_channels | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -43,8 +40,7 @@ paddle.nn.Conv1D(in_channels, ### 转写示例 -#### in_channels: 输入通道数 -在 PyTorch 中,使用 `LazyConv1d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv1D` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### in_channels: 输入通道数在 PyTorch 中,使用 `LazyConv1d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv1D` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 conv = torch.nn.LazyConv1d(out_channels=16, kernel_size=3) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv2d.md index d8632205625..572bf0192b5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv2d.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.LazyConv2d ### [torch.nn.LazyConv2d](https://pytorch.org/docs/stable/generated/torch.nn.LazyConv2d.html) - ```python torch.nn.LazyConv2d(out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None) ``` ### [paddle.nn.Conv2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Conv2D_cn.html#conv2d) - ```python paddle.nn.Conv2D(in_channels, out_channels, @@ -23,7 +21,6 @@ paddle.nn.Conv2D(in_channels, 其中,Paddle 不支持 `in_channels` 参数的延迟初始化,PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | in_channels | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -43,9 +40,7 @@ paddle.nn.Conv2D(in_channels, ### 转写示例 - -#### in_channels: 输入通道数 -在 PyTorch 中,使用 `LazyConv2d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv2D` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### in_channels: 输入通道数在 PyTorch 中,使用 `LazyConv2d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv2D` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 conv = torch.nn.LazyConv2d(out_channels=16, kernel_size=3) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv3d.md index f7bed9b811e..aed5aee0d74 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConv3d.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.LazyConv3d ### [torch.nn.LazyConv3d](https://pytorch.org/docs/stable/generated/torch.nn.LazyConv3d.html) - ```python torch.nn.LazyConv3d(out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None) ``` ### [paddle.nn.Conv3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Conv3D_cn.html#conv3d) - ```python paddle.nn.Conv3D(in_channels, out_channels, @@ -23,7 +21,6 @@ paddle.nn.Conv3D(in_channels, 其中,Paddle 不支持 `in_channels` 参数的延迟初始化,PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | in_channels | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -43,9 +40,7 @@ paddle.nn.Conv3D(in_channels, ### 转写示例 - -#### in_channels: 输入通道数 -在 PyTorch 中,使用 `LazyConv2d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv2D` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### in_channels: 输入通道数在 PyTorch 中,使用 `LazyConv2d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv2D` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 conv = torch.nn.LazyConv3d(out_channels=16, kernel_size=3) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose1d.md index 7c7e7b83685..d16bf04585a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose1d.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.LazyConvTranspose1d ### [torch.nn.LazyConvTranspose1d](https://pytorch.org/docs/stable/generated/torch.nn.LazyConvTranspose1d.html) - ```python torch.nn.LazyConvTranspose1d(out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=1, bias=True, dilation=1, padding_mode='zeros', device=None, dtype=None) ``` @@ -22,7 +21,6 @@ paddle.nn.Conv1DTranspose(in_channels, 其中,Paddle 不支持 `in_channels` 参数的延迟初始化,PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | in_channels | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -42,9 +40,7 @@ paddle.nn.Conv1DTranspose(in_channels, | - | data_format | 输入和输出的数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - -#### in_channels: 输入通道数 -在 PyTorch 中,使用 `LazyConvTranspose1d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv1DTranspose` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### in_channels: 输入通道数在 PyTorch 中,使用 `LazyConvTranspose1d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv1DTranspose` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 conv = torch.nn.LazyConvTranspose1d(out_channels=16, kernel_size=3) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose2d.md index dd847da9569..ebac64a2fc4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose2d.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.LazyConvTranspose2d ### [torch.nn.LazyConvTranspose2d](https://pytorch.org/docs/stable/generated/torch.nn.LazyConvTranspose2d.html) - ```python torch.nn.LazyConvTranspose2d(out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=1, bias=True, dilation=1, padding_mode='zeros', device=None, dtype=None) ``` @@ -22,7 +21,6 @@ paddle.nn.Conv2DTranspose(in_channels, 其中,Paddle 不支持 `in_channels` 参数的延迟初始化,PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | in_channels | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -42,9 +40,7 @@ paddle.nn.Conv2DTranspose(in_channels, | - | data_format | 输入和输出的数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - -#### in_channels: 输入通道数 -在 PyTorch 中,使用 `LazyConvTranspose2d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv2DTranspose` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### in_channels: 输入通道数在 PyTorch 中,使用 `LazyConvTranspose2d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv2DTranspose` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 conv = torch.nn.LazyConvTranspose2d(out_channels=16, kernel_size=(3, 3)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose3d.md index 2c76e827b40..f673863a32f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyConvTranspose3d.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.LazyConvTranspose3d ### [torch.nn.LazyConvTranspose3d](https://pytorch.org/docs/stable/generated/torch.nn.LazyConvTranspose3d.html) - ```python torch.nn.LazyConvTranspose3d(out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=1, bias=True, dilation=1, padding_mode='zeros', device=None, dtype=None) ``` @@ -23,7 +22,6 @@ paddle.nn.Conv3DTranspose(in_channels, 其中,Paddle 不支持 `in_channels` 参数的延迟初始化,PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | in_channels | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -43,9 +41,7 @@ paddle.nn.Conv3DTranspose(in_channels, | - | data_format | 输入和输出的数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - -#### in_channels: 输入通道数 -在 PyTorch 中,使用 `LazyConvTranspose3d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv3DTranspose` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### in_channels: 输入通道数在 PyTorch 中,使用 `LazyConvTranspose3d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv3DTranspose` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 conv = torch.nn.LazyConvTranspose3d(out_channels=16, kernel_size=(3, 3, 3)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm1d.md index 955ee8d731b..6446d21f7c8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm1d.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.LazyInstanceNorm1d ### [torch.nn.LazyInstanceNorm1d](https://pytorch.org/docs/stable/generated/torch.nn.LazyInstanceNorm1d.html) - ```python torch.nn.LazyInstanceNorm1d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None) ``` @@ -12,7 +11,6 @@ paddle.nn.InstanceNorm1D(num_features, epsilon=1e-05, momentum=0.9, weight_attr= 其中,Paddle 不支持 `num_features` 参数的延迟初始化,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | num_features | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -26,9 +24,7 @@ paddle.nn.InstanceNorm1D(num_features, epsilon=1e-05, momentum=0.9, weight_attr= | - | data_format | 指定输入数据格式。 PyTorch 无此参数。 | ### 转写示例 - -#### num_features: 输入通道数 -在 PyTorch 中,使用 `LazyInstanceNorm1d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `InstanceNorm1D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### num_features: 输入通道数在 PyTorch 中,使用 `LazyInstanceNorm1d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `InstanceNorm1D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 bn = torch.nn.LazyInstanceNorm1d() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm2d.md index c4fd8805f3a..67bdd0d9296 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm2d.md @@ -1,19 +1,16 @@ ## [ paddle 参数更多 ]torch.nn.LazyInstanceNorm2d ### [torch.nn.LazyInstanceNorm2d](https://pytorch.org/docs/stable/generated/torch.nn.LazyInstanceNorm2d.html) - ```python torch.nn.LazyInstanceNorm2d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None) ``` ### [paddle.nn.InstanceNorm2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/InstanceNorm2D_cn.html) - ```python paddle.nn.InstanceNorm2D(num_features, epsilon=1e-05, momentum=0.9, weight_attr=None, bias_attr=None, data_format="NCL", name=None) ``` 其中,Paddle 不支持 `num_features` 参数的延迟初始化,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | num_features | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -27,9 +24,7 @@ paddle.nn.InstanceNorm2D(num_features, epsilon=1e-05, momentum=0.9, weight_attr= | - | data_format | 指定输入数据格式。 PyTorch 无此参数。 | ### 转写示例 - -#### num_features: 输入通道数 -在 PyTorch 中,使用 `LazyInstanceNorm2d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `InstanceNorm2D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### num_features: 输入通道数在 PyTorch 中,使用 `LazyInstanceNorm2d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `InstanceNorm2D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 bn = torch.nn.LazyInstanceNorm2d() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm3d.md index cbea4e6f9b5..0bc2f32e728 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyInstanceNorm3d.md @@ -1,19 +1,16 @@ ## [ paddle 参数更多 ]torch.nn.LazyInstanceNorm3d ### [torch.nn.LazyInstanceNorm3d](https://pytorch.org/docs/stable/generated/torch.nn.LazyInstanceNorm3d.html) - ```python torch.nn.LazyInstanceNorm3d(eps=1e-05, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None) ``` ### [paddle.nn.InstanceNorm3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/InstanceNorm3D_cn.html) - ```python paddle.nn.InstanceNorm3D(num_features, epsilon=1e-05, momentum=0.9, weight_attr=None, bias_attr=None, data_format="NCDHW", name=None) ``` 其中,Paddle 不支持 `num_features` 参数的延迟初始化,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | num_features | 表示输入 Tensor 通道数,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的通道数进行设置。 | @@ -28,9 +25,7 @@ paddle.nn.InstanceNorm3D(num_features, epsilon=1e-05, momentum=0.9, weight_attr= | - | data_format | 指定输入数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - -#### num_features: 输入通道数 -在 PyTorch 中,使用 `LazyInstanceNorm3d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `InstanceNorm3D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### num_features: 输入通道数在 PyTorch 中,使用 `LazyInstanceNorm3d` 时可以不指定 `num_features`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `InstanceNorm3D` 时必须明确指定 `num_features` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 bn = torch.nn.LazyInstanceNorm3d() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyLinear.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyLinear.md index a6312652c2c..6d69d02a795 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyLinear.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.LazyLinear.md @@ -1,12 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.LazyLinear ### [torch.nn.LazyLinear](https://pytorch.org/docs/stable/generated/torch.nn.LazyLinear.html) - ```python torch.nn.LazyLinear(out_features, bias=True, device=None, dtype=None) ``` ### [paddle.nn.Linear](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Linear_cn.html#linear) - ```python paddle.nn.Linear(in_features, out_features, @@ -17,7 +15,6 @@ paddle.nn.Linear(in_features, 其中,Paddle 不支持 `in_features` 参数的延迟初始化,PyTorch 的 `bias` 与 Paddle 的 `bias_attr` 用法不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | in_features | 表示线性变换层输入单元的数目,PyTorch 无此参数,Paddle 需要根据实际输入 Tensor 的单元的数目进行设置。 | @@ -29,9 +26,7 @@ paddle.nn.Linear(in_features, | - | bias_attr | 指定偏置参数的属性, 当`bias_attr`设置为 bool 类型时与 PyTorch 的作用一致。 | ### 转写示例 - -#### in_channels: 输入通道数 -在 PyTorch 中,使用 `LazyConvTranspose3d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv3DTranspose` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 +#### in_channels: 输入通道数在 PyTorch 中,使用 `LazyConvTranspose3d` 时可以不指定 `in_channels`,它会在第一次前向传播时根据输入 Tensor 的形状自动确定;而在 Paddle 中,创建 `Conv3DTranspose` 时必须明确指定 `in_channels` 参数,其值应与输入 Tensor 的通道数保持一致。 ```python # PyTorch 写法 linear = torch.nn.LazyLinear(out_features=10) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool1d.md index d6c18761c72..a0382c316b3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool1d.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]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, stride=None, @@ -8,7 +7,6 @@ torch.nn.MaxUnpool1d(kernel_size, ``` ### [paddle.nn.MaxUnPool1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MaxUnPool1D_cn.html) - ```python paddle.nn.MaxUnPool1D(kernel_size, stride=None, @@ -20,7 +18,6 @@ paddle.nn.MaxUnPool1D(kernel_size, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示反池化核大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool2d.md index b14a51d46d5..a758f4797f6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool2d.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]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, stride=None, @@ -8,7 +7,6 @@ torch.nn.MaxUnpool2d(kernel_size, ``` ### [paddle.nn.MaxUnPool2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MaxUnPool2D_cn.html) - ```python paddle.nn.MaxUnPool2D(kernel_size, stride=None, @@ -20,7 +18,6 @@ paddle.nn.MaxUnPool2D(kernel_size, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示反池化核大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool3d.md index 70221412403..4d2523177be 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.MaxUnpool3d.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]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, stride=None, @@ -8,7 +7,6 @@ torch.nn.MaxUnpool3d(kernel_size, ``` ### [paddle.nn.MaxUnPool3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MaxUnPool3D_cn.html) - ```python paddle.nn.MaxUnPool3D(kernel_size, stride=None, @@ -20,7 +18,6 @@ paddle.nn.MaxUnPool3D(kernel_size, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示反池化核大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.bfloat16.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.bfloat16.md index b344b5970a7..6394f332354 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.bfloat16.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.bfloat16.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.Module.bfloat16 - ### [torch.nn.Module.bfloat16](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.bfloat16) - ```python torch.nn.Module.bfloat16() ``` ### [paddle.nn.Layer.to](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#to-device-none-dtype-none-blocking-none) - ```python paddle.nn.Layer.to(dtype=paddle.bfloat16) ``` @@ -15,15 +12,12 @@ paddle.nn.Layer.to(dtype=paddle.bfloat16) Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------- | | - | dtype | 转换的数据类型,Paddle 为 paddle.bfloat16,需要转写。 | ### 转写示例 - #### dtype 参数:转换的数据类型 - ```python # PyTorch 写法: module = torch.nn.Module() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.cpu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.cpu.md index e62f7706051..cab48587a88 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.cpu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.cpu.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.Module.cpu - ### [torch.nn.Module.cpu](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.cpu) - ```python torch.nn.Module.cpu() ``` ### [paddle.nn.Layer.to](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#to-device-none-dtype-none-blocking-none) - ```python paddle.nn.Layer.to(device=None, dtype=None, blocking=None) ``` @@ -15,7 +12,6 @@ paddle.nn.Layer.to(device=None, dtype=None, blocking=None) Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------- | | - | device | 移动到的设备,PyTorch 无此参数,Paddle 设置为 "cpu"。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.cuda.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.cuda.md index df39239ae0b..16c859b4502 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.cuda.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.cuda.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.Module.cuda - ### [torch.nn.Module.cuda](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.cuda) - ```python torch.nn.Module.cuda(device=None) ``` ### [paddle.nn.Layer.to](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#to-device-none-dtype-none-blocking-none) - ```python paddle.nn.Layer.to(device="gpu") ``` @@ -15,15 +12,12 @@ paddle.nn.Layer.to(device="gpu") Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------------- | | device | device | PyTorch 为设备编号,Paddle 为 gpu:设备编号,需要转写。 | ### 转写示例 - #### device 参数:设备 - ```python # PyTorch 写法: module = torch.nn.Module() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.double.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.double.md index 39916d8c389..e8530233b2a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.double.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.double.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.Module.double - ### [torch.nn.Module.double](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.double) - ```python torch.nn.Module.double() ``` ### [paddle.nn.Layer.to](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#to-device-none-dtype-none-blocking-none) - ```python paddle.nn.Layer.to(dtype="float64") ``` @@ -15,15 +12,12 @@ paddle.nn.Layer.to(dtype="float64") Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------- | | - | dtype | 转换的数据类型,Paddle 为 float64,需要转写。 | ### 转写示例 - #### dtype 参数:转换的数据类型 - ```python # PyTorch 写法: module = torch.nn.Module() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.float.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.float.md index 0a8f6554c96..090f8a933b9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.float.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.float.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.Module.float - ### [torch.nn.Module.float](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.float) - ```python torch.nn.Module.float() ``` ### [paddle.nn.Layer.to](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#to-device-none-dtype-none-blocking-none) - ```python paddle.nn.Layer.to(dtype="float32") ``` @@ -15,15 +12,12 @@ paddle.nn.Layer.to(dtype="float32") Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------- | | - | dtype | 转换的数据类型,Paddle 为 float32,需要转写。 | ### 转写示例 - #### dtype 参数:转换的数据类型 - ```python # PyTorch 写法: module = torch.nn.Module() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.half.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.half.md index efc539445b7..61b9d25d9c3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.half.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.half.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.Module.half - ### [torch.nn.Module.half](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.half) - ```python torch.nn.Module.half() ``` ### [paddle.nn.Layer.to](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#to-device-none-dtype-none-blocking-none) - ```python paddle.nn.Layer.to(dtype="float16") ``` @@ -15,15 +12,12 @@ paddle.nn.Layer.to(dtype="float16") Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------- | | - | dtype | 转换的数据类型,Paddle 为 float16,需要转写。 | ### 转写示例 - #### dtype 参数:转换的数据类型 - ```python # PyTorch 写法: module = torch.nn.Module() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.md index 1f29ab98a0d..cc98f820531 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.md @@ -1,13 +1,11 @@ -## [ paddle 参数更多 ] torch.nn.Module +## [ paddle 参数更多 ]torch.nn.Module ### [torch.nn.Module](https://pytorch.org/docs/stable/generated/torch.nn.Module.html?highlight=torch+nn+module#torch.nn.Module) - ```python torch.nn.Module(*args, **kwargs) ``` ### [paddle.nn.Layer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html) - ```python paddle.nn.Layer(name_scope=None, dtype='float32') ``` @@ -15,7 +13,6 @@ paddle.nn.Layer(name_scope=None, dtype='float32') 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----- | ---------- | ------------------------------------ | | - | name_scope | PyTorch 无此参数,Paddle 保持默认即可。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.modules.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.modules.md index 004d279f37c..120feb1a152 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.modules.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.modules.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]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() ``` ### [paddle.nn.Layer.sublayers](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/Layer_cn.html#sublayers-include-self-false) - ```python paddle.nn.Layer.sublayers(include_self=False) ``` @@ -15,7 +12,6 @@ paddle.nn.Layer.sublayers(include_self=False) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | - | include_self | 是否包含本层。PyTorch 无此参数,Paddle 保持默认即可。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.named_modules.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.named_modules.md index f48655393b4..0d2968044e4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.named_modules.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.named_modules.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torch.nn.Module.named_modules - +## [ paddle 参数更多 ]torch.nn.Module.named_modules ### [torch.nn.Module.named_modules](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.named_modules) - ```python torch.nn.Module.named_modules(memo=None, prefix='', remove_duplicate=True) ``` ### [paddle.nn.Layer.named_sublayers](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#named-sublayers-prefix-include-self-false-layers-set-none) - ```python paddle.nn.Layer.named_sublayers(prefix='', include_self=False, layers_set=None, remove_duplicate=True) ``` @@ -15,7 +12,6 @@ paddle.nn.Layer.named_sublayers(prefix='', include_self=False, layers_set=None, Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------- | | memo | layers_set | 用来记录已经加入结果的子层的集合,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.state_dict.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.state_dict.md index 9d61e135e90..aa406968271 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.state_dict.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Module.state_dict.md @@ -1,12 +1,10 @@ -## [ paddle 参数更多 ] torch.nn.Module.state_dict +## [ paddle 参数更多 ]torch.nn.Module.state_dict ### [torch.nn.Module.state_dict](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.state_dict) - ```python torch.nn.Module.state_dict(destination, prefix='', keep_vars=False) ``` ### [paddle.nn.Layer.state_dict](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#state-dict-destination-none-include-sublayers-true-use-hook-true) - ```python paddle.nn.Layer.state_dict(destination=None, include_sublayers=True, structured_name_prefix='', use_hook=True, keep_vars=True) ``` @@ -14,7 +12,6 @@ paddle.nn.Layer.state_dict(destination=None, include_sublayers=True, structured_ Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | destination | destination | 所有参数和可持久性 buffers 都将存放在 destination 中 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Softmax2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Softmax2d.md index 2a34266a2d6..981a73a962a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Softmax2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.Softmax2d.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.Softmax2d - ### [torch.nn.Softmax2d](https://pytorch.org/docs/stable/generated/torch.nn.Softmax2d.html?highlight=softmax2d#torch.nn.Softmax2d) - ```python torch.nn.Softmax2d() ``` ### [paddle.nn.Softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Softmax_cn.html#softmax) - ```python paddle.nn.Softmax(axis=-1) ``` @@ -15,13 +12,11 @@ paddle.nn.Softmax(axis=-1) 其中 Paddle 并没有 torch.nn.Softmax2d 此 api ,可通过 paddle.nn.Softmax 设置参数 axis 为 -3 实现同样的效果: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------ | | - | axis | 指定对输入 Tensor 进行运算的轴。 | ### 转写示例 - ```python # PyTorch 写法 cri = torch.nn.Softmax2d() diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.UpsamplingBilinear2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.UpsamplingBilinear2d.md index 3b68bdef5a0..7a0c4db4906 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.UpsamplingBilinear2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.UpsamplingBilinear2d.md @@ -1,20 +1,16 @@ ## [ paddle 参数更多 ]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) ``` ### [paddle.nn.UpsamplingBilinear2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/UpsamplingBilinear2D_cn.html) - ```python paddle.nn.UpsamplingBilinear2D(size=None,scale_factor=None, data_format='NCHW',name=None) ``` 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | size | size | 表示输出 Tensor 的 size 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.UpsamplingNearest2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.UpsamplingNearest2d.md index ff059d5ad52..de0c4ae5441 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.UpsamplingNearest2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.UpsamplingNearest2d.md @@ -1,20 +1,16 @@ ## [ paddle 参数更多 ]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) ``` ### [paddle.nn.UpsamplingNearest2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/UpsamplingNearest2D_cn.html) - ```python paddle.nn.UpsamplingNearest2D(size=None, scale_factor=None, data_format='NCHW',name=None) ``` 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | size | size | 表示输出 Tensor 的 size 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ZeroPad2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ZeroPad2d.md index 3073555aeb3..3168618f090 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ZeroPad2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.ZeroPad2d.md @@ -1,12 +1,11 @@ ## [ paddle 参数更多 ]torch.nn.ZeroPad2d -### [torch.nn.ZeroPad2d](https://pytorch.org/docs/stable/generated/torch.nn.ZeroPad2d.html?highlight=zeropad#torch.nn.ZeroPad2d) +### [torch.nn.ZeroPad2d](https://pytorch.org/docs/stable/generated/torch.nn.ZeroPad2d.html?highlight=zeropad#torch.nn.ZeroPad2d) ```python torch.nn.ZeroPad2d(padding) ``` ### [paddle.nn.ZeroPad2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/ZeroPad2D_cn.html) - ```python paddle.nn.ZeroPad2D(padding, data_format='NCHW', @@ -15,7 +14,6 @@ paddle.nn.ZeroPad2D(padding, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | padding | padding | 表示填充大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.channel_shuffle.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.channel_shuffle.md index 29c129b21bf..48e457e13e1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.channel_shuffle.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.channel_shuffle.md @@ -1,14 +1,11 @@ ## [ paddle 参数更多 ]torch.nn.functional.channel_shuffle - ### [torch.nn.functional.channel_shuffle](https://pytorch.org/docs/stable/generated/torch.nn.ChannelShuffle.html) - ```python torch.nn.functional.channel_shuffle(input, groups) ``` ### [paddle.nn.functional.channel_shuffle](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/channel_shuffle_cn.html#channel-shuffle) - ```python paddle.nn.functional.channel_shuffle(x, groups, @@ -18,7 +15,6 @@ paddle.nn.functional.channel_shuffle(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose1d.md index 089084ad300..db5249421a0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose1d.md @@ -1,7 +1,5 @@ ## [ 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) - ```python torch.nn.functional.conv_transpose1d(input, weight, @@ -14,7 +12,6 @@ torch.nn.functional.conv_transpose1d(input, ``` ### [paddle.nn.functional.conv1d_transpose](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/conv1d_transpose_cn.html) - ```python paddle.nn.functional.conv1d_transpose(x, weight, @@ -31,7 +28,6 @@ paddle.nn.functional.conv1d_transpose(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose2d.md index 8e46e5c15dc..28020814269 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose2d.md @@ -1,7 +1,5 @@ ## [ 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) - ```python torch.nn.functional.conv_transpose2d(input, weight, @@ -14,7 +12,6 @@ torch.nn.functional.conv_transpose2d(input, ``` ### [paddle.nn.functional.conv2d_transpose](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/conv2d_transpose_cn.html) - ```python paddle.nn.functional.conv2d_transpose(x, weight, @@ -31,7 +28,6 @@ paddle.nn.functional.conv2d_transpose(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose3d.md index 478769cf0d2..4c040755c10 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.conv_transpose3d.md @@ -1,7 +1,5 @@ ## [ 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) - ```python torch.nn.functional.conv_transpose3d(input, weight, @@ -14,7 +12,6 @@ torch.nn.functional.conv_transpose3d(input, ``` ### [paddle.nn.functional.conv3d_transpose](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/conv3d_transpose_cn.html) - ```python paddle.nn.functional.conv3d_transpose(x, weight, @@ -31,7 +28,6 @@ paddle.nn.functional.conv3d_transpose(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.group_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.group_norm.md index af97877a09d..daaaadb913e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.group_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.group_norm.md @@ -1,7 +1,5 @@ ## [ 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) - ```python torch.nn.functional.group_norm(input, num_groups, weight=None, bias=None, eps=1e-05) ``` @@ -14,7 +12,6 @@ paddle.nn.functional.group_norm(x, num_groups, epsilon=1e-05, weight=None, bias= Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.hardsigmoid.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.hardsigmoid.md index 70ca9208d3f..0b3f942f3b3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.hardsigmoid.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.hardsigmoid.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.functional.hardsigmoid - ### [torch.nn.functional.hardsigmoid](https://pytorch.org/docs/stable/generated/torch.nn.functional.hardsigmoid.html) - ```python torch.nn.functional.hardsigmoid(input, inplace=False) ``` ### [paddle.nn.functional.hardsigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/hardsigmoid_cn.html#hardsigmoid) - ```python paddle.nn.functional.hardsigmoid(x, slope=0.1666667, offset=0.5, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.hardsigmoid(x, slope=0.1666667, offset=0.5, name=None) 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.lp_pool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.lp_pool1d.md index d9caa1225f1..490876e3119 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.lp_pool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.lp_pool1d.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.functional.lp_pool1d - ### [torch.nn.functional.lp_pool1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.lp_pool1d.html#torch.nn.functional.lp_pool1d) - ```python torch.nn.functional.lp_pool1d(input, norm_type, kernel_size, stride=None, ceil_mode=False) ``` @@ -14,7 +12,6 @@ paddle.nn.functional.lp_pool1d(x, norm_type, kernel_size, stride=None, padding=0 其中 Paddle 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.lp_pool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.lp_pool2d.md index 363e667067e..12d738b7bf7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.lp_pool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.lp_pool2d.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.functional.lp_pool2d - ### [torch.nn.functional.lp_pool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.lp_pool2d.html#torch.nn.functional.lp_pool2d) - ```python torch.nn.functional.lp_pool2d(input, norm_type, kernel_size, stride=None, ceil_mode=False) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool1d.md index e92443bbea0..c7ded4ab149 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool1d.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.functional.max_unpool1d - ### [torch.nn.functional.max_unpool1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.max_unpool1d.html?highlight=max_unpool1d#torch.nn.functional.max_unpool1d) - ```python torch.nn.functional.max_unpool1d(input, indices, @@ -12,7 +10,6 @@ torch.nn.functional.max_unpool1d(input, ``` ### [paddle.nn.functional.max_unpool1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_unpool1d_cn.html) - ```python paddle.nn.functional.max_unpool1d(x, indices, @@ -26,7 +23,6 @@ paddle.nn.functional.max_unpool1d(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool2d.md index 5d18a5b1cad..1c395f75a3d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool2d.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.functional.max_unpool2d - ### [torch.nn.functional.max_unpool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.max_unpool2d.html?highlight=max_unpool2d#torch.nn.functional.max_unpool2d) - ```python torch.nn.functional.max_unpool2d(input, indices, @@ -12,7 +10,6 @@ torch.nn.functional.max_unpool2d(input, ``` ### [paddle.nn.functional.max_unpool2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_unpool2d_cn.html) - ```python paddle.nn.functional.max_unpool2d(x, indices, @@ -26,7 +23,6 @@ paddle.nn.functional.max_unpool2d(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool3d.md index d3f91b969ba..a6834fa019d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.max_unpool3d.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]torch.nn.functional.max_unpool3d - ### [torch.nn.functional.max_unpool3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.max_unpool3d.html?highlight=max_unpool3d#torch.nn.functional.max_unpool3d) - ```python torch.nn.functional.max_unpool3d(input, indices, @@ -12,7 +10,6 @@ torch.nn.functional.max_unpool3d(input, ``` ### [paddle.nn.functional.max_unpool3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_unpool3d_cn.html) - ```python paddle.nn.functional.max_unpool3d(x, indices, @@ -26,7 +23,6 @@ paddle.nn.functional.max_unpool3d(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pad.md index 521446b5e68..283283c671c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pad.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]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, pad, @@ -10,7 +8,6 @@ torch.nn.functional.pad(input, ``` ### [paddle.nn.functional.pad](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/pad_cn.html#pad) - ```python paddle.nn.functional.pad(x, pad, @@ -24,7 +21,6 @@ paddle.nn.functional.pad(x, 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pixel_shuffle.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pixel_shuffle.md index af43beb0fc8..8a7d8370856 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pixel_shuffle.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pixel_shuffle.md @@ -1,20 +1,16 @@ ## [ 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) - ```python torch.nn.functional.pixel_shuffle(input, upscale_factor) ``` ### [paddle.nn.functional.pixel_shuffle](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/pixel_shuffle_cn.html) - ```python paddle.nn.functional.pixel_shuffle(x, upscale_factor, data_format='NCHW', name=None) ``` 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pixel_unshuffle.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pixel_unshuffle.md index 7c565269cb1..fac76b9267b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pixel_unshuffle.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.pixel_unshuffle.md @@ -1,13 +1,10 @@ -## [ 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) - ```python torch.nn.functional.pixel_unshuffle(input, downscale_factor) ``` ### [paddle.nn.functional.pixel_unshuffle](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/pixel_unshuffle_cn.html) - ```python paddle.nn.functional.pixel_unshuffle(x, downscale_factor, data_format='NCHW', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.pixel_unshuffle(x, downscale_factor, data_format='NCHW', na 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.prelu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.prelu.md index 088c191d48c..61599b665ce 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.prelu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.prelu.md @@ -1,14 +1,11 @@ ## [ 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) - ```python torch.nn.functional.prelu(input, weight) ``` ### [paddle.nn.functional.prelu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/prelu_cn.html) - ```python paddle.nn.functional.prelu(x, weight, @@ -19,7 +16,6 @@ paddle.nn.functional.prelu(x, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample.md index 05ea752e076..efa26c38ae7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample.md @@ -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) @@ -11,7 +11,6 @@ torch.nn.functional.upsample(input, ``` ### [paddle.nn.functional.upsample](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/upsample_cn.html#upsample) - ```python paddle.nn.functional.upsample(x, size=None, @@ -25,7 +24,6 @@ paddle.nn.functional.upsample(x, 两者功能一致,其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample_bilinear.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample_bilinear.md index 9adfab88df9..92247608d75 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample_bilinear.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample_bilinear.md @@ -1,20 +1,16 @@ ## [ 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) - ```python torch.nn.functional.upsample_bilinear(input, size=None, scale_factor=None) ``` ### [paddle.nn.functional.upsample](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/upsample_cn.html#upsample) - ```python paddle.nn.functional.upsample(x, size=None, scale_factor=None, mode='nearest', align_corners=False, align_mode=0, data_format='NCHW', name=None) ``` Paddle 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample_nearest.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample_nearest.md index 4ff35092c73..42ecd6d7bf4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample_nearest.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.nn.functional.upsample_nearest.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.nn.functional.upsample_nearest - ### [torch.nn.functional.upsample_nearest](https://pytorch.org/docs/stable/generated/torch.nn.functional.upsample_nearest.html#torch.nn.functional.upsample_nearest) - ```python torch.nn.functional.upsample_nearest(input, size=None, scale_factor=None) ``` ### [paddle.nn.functional.upsample](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/upsample_cn.html#upsample) - ```python paddle.nn.functional.upsample(x, size=None, scale_factor=None, mode='nearest', align_corners=False, align_mode=0, data_format='NCHW', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.upsample(x, size=None, scale_factor=None, mode='nearest', a 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.optim.LBFGS.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.optim.LBFGS.md index a257ad8b971..bbb42c67336 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.optim.LBFGS.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.optim.LBFGS.md @@ -1,7 +1,5 @@ ## [ paddle 参数更多 ]torch.optim.LBFGS - ### [torch.optim.LBFGS](https://pytorch.org/docs/stable/generated/torch.optim.LBFGS.html) - ```python torch.optim.LBFGS(params, lr=1, @@ -14,7 +12,6 @@ torch.optim.LBFGS(params, ``` ### [paddle.optimizer.LBFGS](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/LBFGS_cn.html) - ```python paddle.optimizer.LBFGS(learning_rate=1.0, max_iter=20, @@ -32,7 +29,6 @@ paddle.optimizer.LBFGS(learning_rate=1.0, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.optim.Optimizer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.optim.Optimizer.md index 7784bddc8d3..8623023c78d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.optim.Optimizer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.optim.Optimizer.md @@ -1,14 +1,11 @@ ## [ paddle 参数更多 ]torch.optim.Optimizer - ### [torch.optim.Optimizer](https://pytorch.org/docs/stable/optim.html#torch.optim.Optimizer) - ```python torch.optim.Optimizer(params, defaults) ``` ### [paddle.optimizer.Optimizer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Optimizer_cn.html) - ```python paddle.optimizer.Optimizer(learning_rate=0.001, epsilon=1e-08, @@ -21,7 +18,6 @@ paddle.optimizer.Optimizer(learning_rate=0.001, PyTorch 相比 Paddle 支持更多其他参数,其 `defaults` 可以支持各种参数,但一般只会转写 API 名称,不会转写参数。 ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.selu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.selu.md index 29c88915b20..403c544ad5e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.selu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.selu.md @@ -1,13 +1,10 @@ ## [ paddle 参数更多 ]torch.selu - ### [torch.selu](https://pytorch.org/docs/stable/generated/torch.nn.functional.selu.html#torch.nn.functional.selu) - ```python torch.selu(input) ``` ### [paddle.nn.functional.selu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/selu_cn.html) - ```python paddle.nn.functional.selu(x, scale=1.0507009873554804934193349852946, alpha=1.6732632423543772848170429916717, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.selu(x, scale=1.0507009873554804934193349852946, alpha=1.67 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.utils.data.BatchSampler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.utils.data.BatchSampler.md index ca1b9036dc3..46ab0c01e9f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.utils.data.BatchSampler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torch.utils.data.BatchSampler.md @@ -1,6 +1,5 @@ ## [ paddle 参数更多 ]torch.utils.data.BatchSampler ### [torch.utils.data.BatchSampler](https://pytorch.org/docs/stable/data.html?highlight=batchsampler#torch.utils.data.BatchSampler) - ```python torch.utils.data.BatchSampler(sampler, batch_size, @@ -8,7 +7,6 @@ torch.utils.data.BatchSampler(sampler, ``` ### [paddle.io.BatchSampler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/BatchSampler_cn.html#batchsampler) - ```python paddle.io.BatchSampler(dataset=None, sampler=None, @@ -19,7 +17,6 @@ paddle.io.BatchSampler(dataset=None, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | -------------| ---------- | | sampler | sampler | 底层取样器,可为 Sampler 或 Iterable 数据类型。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.DeformConv2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.DeformConv2d.md index 54cbafd307b..0510884dc3f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.DeformConv2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.DeformConv2d.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torchvision.ops.DeformConv2d - +## [ paddle 参数更多 ]torchvision.ops.DeformConv2d ### [torchvision.ops.DeformConv2d](https://pytorch.org/vision/main/generated/torchvision.ops.DeformConv2d.html) - ```python torchvision.ops.DeformConv2d(in_channels: int, out_channels: int, kernel_size: int, stride: int = 1, padding: int = 0, dilation: int = 1, groups: int = 1, bias: bool = True) ``` ### [paddle.vision.ops.DeformConv2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/ops/DeformConv2D_cn.html) - ```python paddle.vision.ops.DeformConv2D(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, deformable_groups=1, groups=1, weight_attr=None, bias_attr=None) ``` @@ -15,7 +12,6 @@ paddle.vision.ops.DeformConv2D(in_channels, out_channels, kernel_size, stride=1, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | --------------------------- | ------------------------------ | --------------------- | | in_channels | in_channels | 输入通道数。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.deform_conv2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.deform_conv2d.md index 508b621af52..22261c99505 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.deform_conv2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.deform_conv2d.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torchvision.ops.deform_conv2d - +## [ paddle 参数更多 ]torchvision.ops.deform_conv2d ### [torchvision.ops.deform_conv2d](https://pytorch.org/vision/main/generated/torchvision.ops.deform_conv2d.html) - ```python torchvision.ops.deform_conv2d(input: Tensor, offset: Tensor, weight: Tensor, bias: Optional[Tensor] = None, stride: Tuple[int, int] = (1, 1), padding: Tuple[int, int] = (0, 0), dilation: Tuple[int, int] = (1, 1), mask: Optional[Tensor] = None) ``` ### [paddle.vision.ops.deform_conv2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/ops/deform_conv2d_cn.html) - ```python paddle.vision.ops.deform_conv2d(x, offset, weight, bias=None, stride=1, padding=0, dilation=1, deformable_groups=1, groups=1, mask=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.vision.ops.deform_conv2d(x, offset, weight, bias=None, stride=1, padding= 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | --------------------------- | ------------------------------ | --------------------- | | input | x | 输入数据,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.nms.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.nms.md index 39264e610b6..2b8af97a1da 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.nms.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.ops.nms.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torchvision.ops.nms - +## [ paddle 参数更多 ]torchvision.ops.nms ### [torchvision.ops.nms](https://pytorch.org/vision/main/generated/torchvision.ops.nms.html) - ```python torchvision.ops.nms(boxes: Tensor, scores: Tensor, iou_threshold: float) ``` ### [paddle.vision.ops.nms](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/ops/nms_cn.html) - ```python paddle.vision.ops.nms(boxes, iou_threshold=0.3, scores=None, category_idxs=None, categories=None, top_k=None) ``` @@ -15,7 +12,6 @@ paddle.vision.ops.nms(boxes, iou_threshold=0.3, scores=None, category_idxs=None, 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | --------------------------- | ------------------------------ | --------------------- | | boxes | boxes | 待进行计算的框坐标。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.CenterCrop.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.CenterCrop.md index a841609c86e..7c6c72d70a0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.CenterCrop.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.CenterCrop.md @@ -1,7 +1,5 @@ -## [paddle 参数更多]torchvision.transforms.CenterCrop - +## [ paddle 参数更多 ]torchvision.transforms.CenterCrop ### [torchvision.transforms.CenterCrop](https://pytorch.org/vision/main/generated/torchvision.transforms.CenterCrop.html) - ```python torchvision.transforms.CenterCrop( size: Union[int, List[int], Tuple[int, ...]] @@ -9,7 +7,6 @@ torchvision.transforms.CenterCrop( ``` ### [paddle.vision.transforms.CenterCrop](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/CenterCrop_cn.html) - ```python paddle.vision.transforms.CenterCrop( size: Union[int, List[int], Tuple[int, ...]], @@ -20,7 +17,6 @@ paddle.vision.transforms.CenterCrop( 两者功能一致,但 Paddle 相比 torchvision 支持更多参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------------- | | size | size | 输出图像的形状大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.ColorJitter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.ColorJitter.md index a840a169816..c7496581ed6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.ColorJitter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.ColorJitter.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torchvision.transforms.ColorJitter - +## [ paddle 参数更多 ]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) ``` ### [paddle.vision.transforms.ColorJitter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/ColorJitter_cn.html) - ```python paddle.vision.transforms.ColorJitter(brightness=0, contrast=0, saturation=0, hue=0, keys=None) ``` @@ -15,7 +12,6 @@ paddle.vision.transforms.ColorJitter(brightness=0, contrast=0, saturation=0, hue 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | --------------------------- | ------------------------------ | --------------------- | | brightness | brightness | 亮度调整范围大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.Grayscale.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.Grayscale.md index 61f9dba475a..0c304d21720 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.Grayscale.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.Grayscale.md @@ -1,13 +1,11 @@ -## [paddle 参数更多]torchvision.transforms.Grayscale +## [ paddle 参数更多 ]torchvision.transforms.Grayscale ### [torchvision.transforms.Grayscale](https://pytorch.org/vision/main/generated/torchvision.transforms.Grayscale.html) - ```python torchvision.transforms.Grayscale(num_output_channels: int = 1) ``` ### [paddle.vision.transforms.Grayscale](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/Grayscale_cn.html) - ```python paddle.vision.transforms.Grayscale( num_output_channels: int = 1, @@ -18,7 +16,6 @@ paddle.vision.transforms.Grayscale( 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | --------------------------- | ------------------------------ | --------------------- | | num_output_channels | num_output_channels | 输出图像的通道数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.Pad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.Pad.md index 72915bbfc1f..7b89026d51c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.Pad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.Pad.md @@ -1,4 +1,4 @@ -## [paddle 参数更多]torchvision.transforms.Pad +## [ paddle 参数更多 ]torchvision.transforms.Pad ### [torchvision.transforms.Pad](https://pytorch.org/vision/main/generated/torchvision.transforms.Pad.html) @@ -11,7 +11,6 @@ torchvision.transforms.Pad( ``` ### [paddle.vision.transforms.Pad](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/Pad__upper_cn.html#pad) - ```python paddle.vision.transforms.Pad( padding: Union[int, List[int], Tuple[int, ...]], @@ -24,7 +23,6 @@ paddle.vision.transforms.Pad( 两者功能一致,但 Paddle 相比 torchvision 支持更多参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------- | ------------- | ----------------------------- | | padding | padding | 在图像边界上进行填充的范围。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomCrop.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomCrop.md index 06fd1c9a888..6ec466d822a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomCrop.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomCrop.md @@ -1,7 +1,5 @@ -## [paddle 参数更多]torchvision.transforms.RandomCrop - +## [ paddle 参数更多 ]torchvision.transforms.RandomCrop ### [torchvision.transforms.RandomCrop](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomCrop.html) - ```python torchvision.transforms.RandomCrop( size: Union[int, List[int], Tuple[int, ...]], @@ -13,7 +11,6 @@ torchvision.transforms.RandomCrop( ``` ### [paddle.vision.transforms.RandomCrop](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomCrop_cn.html) - ```python paddle.vision.transforms.RandomCrop( size: Union[int, List[int], Tuple[int, ...]], @@ -28,7 +25,6 @@ paddle.vision.transforms.RandomCrop( 两者功能一致,但 Paddle 相比 torchvision 支持更多参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------- | -------------- | -------------------------------------------------------- | | size | size | 裁剪后的图片大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomErasing.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomErasing.md index 7f386563092..255237ce339 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomErasing.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomErasing.md @@ -1,7 +1,5 @@ -## [paddle 参数更多]torchvision.transforms.RandomErasing - +## [ paddle 参数更多 ]torchvision.transforms.RandomErasing ### [torchvision.transforms.RandomErasing](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomErasing.html?highlight=randomerasing#torchvision.transforms.RandomErasing) - ```python torchvision.transforms.RandomErasing(p = 0.5, scale = (0.02, 0.33), @@ -11,7 +9,6 @@ torchvision.transforms.RandomErasing(p = 0.5, ``` ### [paddle.vision.transforms.RandomErasing](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomErasing_cn.html) - ```python paddle.vision.transforms.RandomErasing(prob = 0.5, scale = (0.02, 0.33), @@ -24,7 +21,6 @@ paddle.vision.transforms.RandomErasing(prob = 0.5, 两者功能基本一致,但 Paddle 相比 torchvision 支持更多参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------- | -------------- | --------------- | | p | prob | 输入数据被执行擦除操作的概率,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomHorizontalFlip.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomHorizontalFlip.md index db78468c54e..14eb4064609 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomHorizontalFlip.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomHorizontalFlip.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torchvision.transforms.RandomHorizontalFlip - +## [ paddle 参数更多 ]torchvision.transforms.RandomHorizontalFlip ### [torchvision.transforms.RandomHorizontalFlip](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomHorizontalFlip.html?highlight=randomhorizontalflip#torchvision.transforms.RandomHorizontalFlip) - ```python torchvision.transforms.RandomHorizontalFlip(p: float = 0.5) ``` ### [paddle.vision.transforms.RandomHorizontalFlip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomHorizontalFlip_cn.html) - ```python paddle.vision.transforms.RandomHorizontalFlip( prob: float = 0.5, @@ -18,7 +15,6 @@ paddle.vision.transforms.RandomHorizontalFlip( 两者功能一致,但 Paddle 相比 torchvision 支持更多参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------- | ------------- | --------------------- | | p | prob | 翻转概率,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transform.RandomVerticalFlip.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomVerticalFlip.md similarity index 93% rename from docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transform.RandomVerticalFlip.md rename to docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomVerticalFlip.md index ec70e26652e..28f2bddc84a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transform.RandomVerticalFlip.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.RandomVerticalFlip.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torchvision.transforms.RandomVerticalFlip - +## [ paddle 参数更多 ]torchvision.transforms.RandomVerticalFlip ### [torchvision.transforms.RandomVerticalFlip](https://pytorch.org/vision/main/generated/torchvision.transforms.RandomVerticalFlip.html) - ```python torchvision.transforms.RandomVerticalFlip(p: float = 0.5) ``` ### [paddle.vision.transforms.RandomVerticalFlip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/RandomVerticalFlip_cn.html) - ```python paddle.vision.transforms.RandomVerticalFlip( prob: float = 0.5, @@ -18,7 +15,6 @@ paddle.vision.transforms.RandomVerticalFlip( Paddle 比 PyTorch 支持更多参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------| ------------ | ------------------------------------------------------------ | | p | prob | 翻转概率,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.ToTensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.ToTensor.md index 96ea74b9013..c7c234e0910 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.ToTensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.ToTensor.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torchvision.transforms.ToTensor - +## [ paddle 参数更多 ]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() ``` ### [paddle.vision.transforms.ToTensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/ToTensor_cn.html#totensor) - ```python paddle.vision.transforms.ToTensor(data_format: str = 'CHW', keys: List[str] | Tuple[str] = None) ``` @@ -15,7 +12,6 @@ paddle.vision.transforms.ToTensor(data_format: str = 'CHW', keys: List[str] | Tu 两者功能基本一致,但 Paddle 相比 torchvision 支持更多参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | |-------------- |-------------------- |----------------------------------- | | - | data_format | 返回 Tensor 的格式,PyTorch 无此参数,Paddle 保持默认即可。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.functional.to_tensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.functional.to_tensor.md index fe15160dafe..c4e9e6f158b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.functional.to_tensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/paddle_more_args/torchvision.transforms.functional.to_tensor.md @@ -1,13 +1,10 @@ -## [paddle 参数更多]torchvision.transforms.functional.to_tensor - +## [ paddle 参数更多 ]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]) ``` ### [paddle.vision.transforms.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/to_tensor_cn.html) - ```python paddle.vision.transforms.to_tensor( pic: Union[PIL.Image.Image, np.ndarray], @@ -18,7 +15,6 @@ paddle.vision.transforms.to_tensor( 其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | --------- | ------------- | ------------------------------ | | pic | pic | 输入图像。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.ColumnParallelLinear.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.ColumnParallelLinear.md index 2f29477d94e..2dbaa8ecd08 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.ColumnParallelLinear.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.ColumnParallelLinear.md @@ -1,12 +1,9 @@ -## [torch 参数更多]fairscale.nn.model_parallel.layers.ColumnParallelLinear - +## [ torch 参数更多 ]fairscale.nn.model_parallel.layers.ColumnParallelLinear ### [fairscale.nn.model_parallel.layers.ColumnParallelLinear](https://github.com/facebookresearch/fairscale/blob/164cc0f3170b4a3951dd84dda29c3e1504ac4d6e/fairscale/nn/model_parallel/layers.py#L218) - ```python fairscale.nn.model_parallel.layers.ColumnParallelLinear(in_features: int, out_features: int, bias: bool = True, gather_output: bool = True, init_method: Callable[[torch.Tensor], torch.Tensor] = init.xavier_normal_, stride: int = 1, keep_master_weight_for_test: bool = False) ``` ### [paddle.distributed.fleet.meta_parallel.ColumnParallelLinear](https://github.com/PaddlePaddle/Paddle/blob/016766cc89fabc10181453ce70b701dd8ed019f6/python/paddle/distributed/fleet/layers/mpu/mp_layers.py#L153) - ```python paddle.distributed.fleet.meta_parallel.ColumnParallelLinear(in_features, out_features, weight_attr=None, has_bias=None, gather_output=True, fuse_matmul_bias=False, mp_group=None, name=None) ``` @@ -14,7 +11,6 @@ paddle.distributed.fleet.meta_parallel.ColumnParallelLinear(in_features, out_fea PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | fairscale | PaddlePaddle | 备注 | | ----------------------------| ---------------- | -------- | | in_features | in_features | 输入特征数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.ParallelEmbedding.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.ParallelEmbedding.md index 0c957cd0a84..8d06b053c1e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.ParallelEmbedding.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.ParallelEmbedding.md @@ -1,12 +1,9 @@ -## [torch 参数更多]fairscale.nn.model_parallel.layers.ParallelEmbedding - +## [ torch 参数更多 ]fairscale.nn.model_parallel.layers.ParallelEmbedding ### [fairscale.nn.model_parallel.layers.ParallelEmbedding](https://github.com/facebookresearch/fairscale/blob/164cc0f3170b4a3951dd84dda29c3e1504ac4d6e/fairscale/nn/model_parallel/layers.py#L152) - ```python fairscale.nn.model_parallel.layers.ParallelEmbedding(num_embeddings: int, embedding_dim: int ,padding_idx: Optional[int] = None, max_norm: Optional[float] = None, norm_type: float = 2.0, scale_grad_by_freq: bool = False, sparse: bool = False, init_method: Callable[[torch.Tensor], torch.Tensor] = init.xavier_normal_, keep_master_weight_for_test: bool = False) ``` ### [paddle.distributed.fleet.meta_parallel.VocabParallelEmbedding](https://github.com/PaddlePaddle/Paddle/blob/016766cc89fabc10181453ce70b701dd8ed019f6/python/paddle/distributed/fleet/layers/mpu/mp_layers.py#L37) - ```python paddle.distributed.fleet.meta_parallel.VocabParallelEmbedding(num_embeddings, embedding_dim, weight_attr=None, mp_group=None, name=None) ``` @@ -14,7 +11,6 @@ paddle.distributed.fleet.meta_parallel.VocabParallelEmbedding(num_embeddings, em 两者功能大体一致,但内部实现细节不一样,ParallelEmbedding 的切分方向沿着 embedding 方向,VocabParallelEmbedding 的切分方向沿着 vocab(词汇表)方向,故在多卡训练时,load 参数时需手动修改以匹配参数切分方式的不同。 ### 参数映射 - | fairscale | PaddlePaddle | 备注 | | ---------------------------- | -------------- | -------- | | num_embeddings | num_embeddings | 词汇表大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.RowParallelLinear.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.RowParallelLinear.md index c520b00846f..bad80b5317b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.RowParallelLinear.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/fairscale.nn.model_parallel.layers.RowParallelLinear.md @@ -1,13 +1,10 @@ -## [torch 参数更多]fairscale.nn.model_parallel.layers.RowParallelLinear - +## [ torch 参数更多 ]fairscale.nn.model_parallel.layers.RowParallelLinear ### [fairscale.nn.model_parallel.layers.RowParallelLinear](https://github.com/facebookresearch/fairscale/blob/164cc0f3170b4a3951dd84dda29c3e1504ac4d6e/fairscale/nn/model_parallel/layers.py#L299) - ```python fairscale.nn.model_parallel.layers.RowParallelLinear(in_features: int, out_features: int, bias: bool = True, input_is_parallel: bool = False, init_method: Callable[[torch.Tensor], torch.Tensor] = init.xavier_normal_, stride: int = 1, keep_master_weight_for_test: bool = False) ``` ### [paddle.distributed.fleet.meta_parallel.RowParallelLinear](https://github.com/PaddlePaddle/Paddle/blob/016766cc89fabc10181453ce70b701dd8ed019f6/python/paddle/distributed/fleet/layers/mpu/mp_layers.py#L291) - ```python paddle.distributed.fleet.meta_parallel.RowParallelLinear(in_features, out_features, weight_attr=None, has_bias=True, input_is_parallel=False, fuse_matmul_bias=False, mp_group=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.fleet.meta_parallel.RowParallelLinear(in_features, out_featur PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | fairscale | PaddlePaddle | 备注 | | ----------------------------| ---------------- | -------- | | in_features | in_features | 输入特征数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/flash_attn.flash_attn_interface.flash_attn_func.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/flash_attn.flash_attn_interface.flash_attn_func.md index 1e6f1f45b75..d12a26d668e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/flash_attn.flash_attn_interface.flash_attn_func.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/flash_attn.flash_attn_interface.flash_attn_func.md @@ -1,13 +1,10 @@ -## [torch 参数更多]flash_attn.flash_attn_interface.flash_attn_func - +## [ torch 参数更多 ]flash_attn.flash_attn_interface.flash_attn_func ### [flash_attn.flash_attn_interface.flash_attn_func](https://github.com/Dao-AILab/flash-attention/blob/72e27c6320555a37a83338178caa25a388e46121/flash_attn/flash_attn_interface.py#L808) - ```python flash_attn.flash_attn_interface.flash_attn_func(q, k, v,dropout_p=0.0, softmax_scale=None, causal=False, window_size=(-1, -1), softcap=0.0, alibi_slopes=None, deterministic=False, return_attn_probs=False) ``` ### [paddle.nn.functional.flash_attention.flash_attention](https://github.com/PaddlePaddle/Paddle/blob/900d27c40ef4567d7ea6342f3f0eedd394885ecb/python/paddle/nn/functional/flash_attention.py#L248) - ```python paddle.nn.functional.flash_attention.flash_attention(query, key, value, dropout=0.0, causal=False,return_softmax=False, *, fixed_seed_offset=None, rng_name="", training=True) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.flash_attention.flash_attention(query, key, value, dropout= 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | flash_attn | PaddlePaddle | 备注 | | ----------------- | ----------------- | ------------------------------------------------------------ | | q | query | 注意力模块的 query Tensor。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/flash_attn.flash_attn_interface.flash_attn_unpadded_func.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/flash_attn.flash_attn_interface.flash_attn_unpadded_func.md index 03bc02111e7..5de0411ba76 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/flash_attn.flash_attn_interface.flash_attn_unpadded_func.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/flash_attn.flash_attn_interface.flash_attn_unpadded_func.md @@ -1,13 +1,10 @@ -## [torch 参数更多]flash_attn.flash_attn_interface.flash_attn_unpadded_func - +## [ torch 参数更多 ]flash_attn.flash_attn_interface.flash_attn_unpadded_func ### [flash_attn.flash_attn_interface.flash_attn_unpadded_func](https://github.com/Dao-AILab/flash-attention/blob/d0787acc16c3667156b51ce5b01bdafc7594ed39/flash_attn/flash_attn_interface.py#L1050) - ```python flash_attn.flash_attn_interface.flash_attn_unpadded_func(q, k, v, cu_seqlens_q, cu_seqlens_k, max_seqlen_q,max_seqlen_k, dropout_p=0.0, softmax_scale=None, causal=False, window_size=(-1, -1), softcap=0.0, alibi_slopes=None, deterministic=False, return_attn_probs=False, block_table=None) ``` ### [paddle.nn.functional.flash_attention.flash_attn_unpadded](https://github.com/PaddlePaddle/Paddle/blob/b32b51b7c21ad62bf794512c849a603c8c0ece44/python/paddle/nn/functional/flash_attention.py#L664) - ```python paddle.nn.functional.flash_attention.flash_attn_unpadded(query, key, value, cu_seqlens_q, cu_seqlens_k, max_seqlen_q, max_seqlen_k, scale,dropout=0.0, causal=False, return_softmax=False, fixed_seed_offset=None, rng_name='', training=True, name=None) @@ -16,7 +13,6 @@ max_seqlen_q, max_seqlen_k, scale,dropout=0.0, causal=False, return_softmax=Fals 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | flash_attn | PaddlePaddle | 备注 | | ----------------- | ----------------- | ------------------------------------------------------------ | | q | query | 注意力模块的 query Tensor。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.backward.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.backward.md index fa34837d8ff..67604511377 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.backward.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.backward.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.Tensor.backward - +## [ torch 参数更多 ]torch.Tensor.backward ### [torch.Tensor.backward](https://pytorch.org/docs/stable/generated/torch.Tensor.backward.html#torch.Tensor.backward) - ```python torch.Tensor.backward(gradient=None, retain_graph=None, create_graph=False, inputs=None) ``` ### [paddle.Tensor.backward](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#backward-grad-tensor-none-retain-graph-false) - ```python paddle.Tensor.backward(grad_tensor=None, retain_graph=False) ``` @@ -15,7 +12,6 @@ paddle.Tensor.backward(grad_tensor=None, retain_graph=False) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------------------- | | gradient | grad_tensor | 当前 Tensor 的初始梯度值。仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.bernoulli.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.bernoulli.md index c725f2eb6f2..285d7d1d83a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.bernoulli.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.bernoulli.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.Tensor.bernoulli - +## [ torch 参数更多 ]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) ``` ### [paddle.bernoulli](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/bernoulli_cn.html#bernoulli) - ```python paddle.bernoulli(x, p=None, name=None) ``` @@ -16,7 +13,6 @@ Pytorch 为 Tensor 类方法,Paddle 为普通函数,另外 PyTorch 相比 Pa ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------------- | | self | x | 伯努利参数 Tensor,将调用 torch.Tensor 类方法的 self Tensor 传入。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.bernoulli_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.bernoulli_.md index 2416b8b1385..e0779417566 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.bernoulli_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.bernoulli_.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.Tensor.bernoulli_ - ### [torch.Tensor.bernoulli_](https://pytorch.org/docs/stable/generated/torch.Tensor.bernoulli_.html#torch.Tensor.bernoulli_) - ```python torch.Tensor.bernoulli_(p=0.5, *, generator=None) ``` ### [paddle.Tensor.bernoulli_](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/tensor/tensor.py) - ```python paddle.Tensor.bernoulli_(p=0.5, name=None) ``` @@ -16,7 +13,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------------- | | p | p | 可选,伯努利参数 p。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.cauchy_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.cauchy_.md index e0190dbdbec..ac11a28140e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.cauchy_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.cauchy_.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.Tensor.cauchy_ - ### [torch.Tensor.cauchy_](https://pytorch.org/docs/stable/generated/torch.Tensor.cauchy_.html) - ```python torch.Tensor.cauchy_(median=0, sigma=1, *, generator=None) ``` ### [paddle.Tensor.cauchy_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html) - ```python paddle.Tensor.cauchy_(loc=0, scale=1, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.cauchy_(loc=0, scale=1, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | ------------------------------------------------------------------------------------ | | median | loc | 柯西分布的中位数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.exponential_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.exponential_.md index 119ef5c5192..da1a8c7f4f0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.exponential_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.exponential_.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.Tensor.exponential\_ - +## [ torch 参数更多 ]torch.Tensor.exponential\_ ### [torch.Tensor.exponential\_](https://pytorch.org/docs/stable/generated/torch.Tensor.exponential_.html#torch.Tensor.exponential_) - ```python torch.Tensor.exponential_(lambd=1, *, generator=None) ``` ### [paddle.Tensor.exponential\_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#exponential-lam-1-0-name-none) - ```python paddle.Tensor.exponential_(lam=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.exponential_(lam=1.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | ----------------------------------------------------------------------------------- | | lambd | lam | 指数分布的 λ 参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.geometric_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.geometric_.md index 1722b8f9e89..aca24b534b2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.geometric_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.geometric_.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.Tensor.geometric_ - ### [torch.Tensor.geometric_](https://pytorch.org/docs/stable/generated/torch.Tensor.geometric_.html) - ```python torch.Tensor.geometric_(p, *, generator=None) ``` ### [paddle.Tensor.geometric_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html) - ```python paddle.Tensor.geometric_(probs, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.geometric_(probs, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------- | | p | probs | 每次伯努利试验中成功的概率,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.index_add.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.index_add.md index ea6ad3dfdb8..a665b8e302f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.index_add.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.index_add.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.Tensor.index_add ### [torch.Tensor.index_add](https://pytorch.org/docs/stable/generated/torch.Tensor.index_add.html#torch.Tensor.index_add) - ```python torch.Tensor.index_add(dim, index, source, *, alpha=1) ``` ### [paddle.Tensor.index_add]() - ```python paddle.Tensor.index_add(index, axis, value, name=None) ``` 其中 PyTorch 与 Paddle 参数有差异,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 表示进行运算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.index_add_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.index_add_.md index 0a6541cbefc..4ffb47ccf17 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.index_add_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.index_add_.md @@ -1,12 +1,10 @@ ## [ torch 参数更多 ]torch.Tensor.index_add_ ### [torch.Tensor.index_add_](https://pytorch.org/docs/stable/generated/torch.Tensor.index_add_.html#torch.Tensor.index_add_) - ```python torch.Tensor.index_add_(dim, index, source, *, alpha=1) ``` ### [paddle.Tensor.index_add_]() - ```python paddle.Tensor.index_add_(index, axis, value) ``` @@ -14,7 +12,6 @@ paddle.Tensor.index_add_(index, axis, value) 其中 PyTorch 与 Paddle 参数有差异,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 表示进行运算的轴,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.log_normal_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.log_normal_.md index f4b5a0f34ec..61b4300ef5a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.log_normal_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.log_normal_.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.Tensor.log_normal_ - ### [torch.Tensor.log_normal_](https://pytorch.org/docs/stable/generated/torch.Tensor.log_normal_.html#torch-tensor-log-normal) - ```python torch.Tensor.log_normal_(mean=1, std=2, *, generator=None) ``` ### [paddle.Tensor.log_normal_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#log_normal-mean-1-0-std-2-0-shape-none-name-none) - ```python paddle.Tensor.log_normal_(mean=1.0, std=2.0, name=None) ``` @@ -15,13 +12,11 @@ paddle.Tensor.log_normal_(mean=1.0, std=2.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------------------- | | generator | - | 用于采样的伪随机数生成器, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - ```python # torch 写法 x = torch.randn(2, 3) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.nanmean.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.nanmean.md index b3127c3dd98..eb2aefe57e9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.nanmean.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.nanmean.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.Tensor.nanmean - ### [torch.Tensor.nanmean](https://pytorch.org/docs/stable/generated/torch.Tensor.nanmean.html?highlight=nanmean#torch.Tensor.nanmean) - ```python torch.Tensor.nanmean(dim=None, keepdim=False, @@ -9,7 +7,6 @@ torch.Tensor.nanmean(dim=None, ``` ### [paddle.Tensor.nanmean](暂无对应文档) - ```python paddle.Tensor.nanmean(axis=None, keepdim=False, @@ -19,7 +16,6 @@ paddle.Tensor.nanmean(axis=None, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | dim | axis | 表示进行运算的轴,可选项,仅参数名不一致。 | @@ -27,9 +23,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | dtype | - | 指定输出数据类型,可选项,PyTorch 默认值为 None,Paddle 无此参数,需要转写。 | ### 转写示例 - #### dytpe:指定数据类型 - ```python # PyTorch 写法 x.nanmean(dim=-1, dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.new_tensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.new_tensor.md index 18372308fd7..7c3dcdff3b3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.new_tensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.new_tensor.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.Tensor.new_tensor - +## [ torch 参数更多 ]torch.Tensor.new_tensor ### [torch.Tensor.new_tensor](https://pytorch.org/docs/stable/generated/torch.Tensor.new_tensor.html#torch-tensor-new-tensor) - ```python torch.Tensor.new_tensor(data, *, dtype=None, device=None, requires_grad=False) ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html) - ```python paddle.to_tensor(data, dtype=None, place=None, stop_gradient=True) ``` @@ -15,7 +12,6 @@ paddle.to_tensor(data, dtype=None, place=None, stop_gradient=True) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------ | | data | data | 数据内容。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | stop_gradient | 表示是否计算梯度,两者参数功能相反,需要转写。 | ### 转写示例 - #### dtype:数据类型 - ```python # PyTorch 写法 y = x.new_tensor(data) @@ -36,7 +30,6 @@ y = paddle.to_tensor(data, dtype=x.dtype) ``` #### requires_grad:是否求梯度 - ```python # PyTorch 写法 y = x.new_tensor(data, requires_grad=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.numpy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.numpy.md index eab34d1e6ec..eb87c8bcf0c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.numpy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.numpy.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.Tensor.numpy - +## [ torch 参数更多 ]torch.Tensor.numpy ### [torch.Tensor.numpy](https://pytorch.org/docs/stable/generated/torch.Tensor.numpy.html?highlight=numpy#torch.Tensor.numpy) - ```python torch.Tensor.numpy(force=False) ``` ### [paddle.Tensor.numpy](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#numpy) - ```python paddle.Tensor.numpy() ``` @@ -17,7 +14,6 @@ paddle.Tensor.numpy() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------------------- | | force | - | 若 force 为默认,则返回的 ndarray 和 tensor 将共享它们的存储空间。Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.resize_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.resize_.md index 8482e81baaa..ca7f969e941 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.resize_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.resize_.md @@ -1,12 +1,11 @@ ## [ torch 参数更多 ]torch.Tensor.resize_ -### [torch.Tensor.resize_](https://pytorch.org/docs/stable/generated/torch.Tensor.resize_.html) +### [torch.Tensor.resize_](https://pytorch.org/docs/stable/generated/torch.Tensor.resize_.html) ```python torch.Tensor.resize_(*sizes, memory_format=torch.contiguous_format) ``` ### [paddle.Tensor.resize_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#resize-shape-fill-zero-false-name-none) - ```python paddle.Tensor.resize_(shape, fill_zero=False, name=None) ``` @@ -14,16 +13,13 @@ paddle.Tensor.resize_(shape, fill_zero=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | *sizes | shape | 设置的目标形状,torch 支持可变参数或 list/tuple,paddle 仅支持 list/tuple。对于可变参数的用法,需要转写。 | | memory_format | - | 设置后的内存形式,Paddle 无此参数,暂无转写方式。 | -| - | fill_zero | 当目标形状的元素个数大于 ``self`` 的元素个数时,是否用 0 填充新元素,若 False 则新元素的值不确定,PyTorch 无此参数,Paddle 保持默认即可。 | - +| - | fill_zero | 当目标形状的元素个数大于``self`` 的元素个数时,是否用 0 填充新元素,若 False 则新元素的值不确定,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### *sizes: 目标形状,可变参数用法 ```python # pytorch diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.round.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.round.md index 7ca3ed10a7c..ee78ffd35cc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.round.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.round.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.Tensor.round - +## [ torch 参数更多 ]torch.Tensor.round ### [torch.Tensor.round](https://pytorch.org/docs/stable/generated/torch.Tensor.round.html#torch.Tensor.round) - ```python torch.Tensor.round(decimals=0) ``` ### [paddle.Tensor.round](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#round-name-none) - ```python paddle.Tensor.round(name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.round(name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------- | ------- | | decimals | - | 舍入小数位数 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.round_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.round_.md index 117a65edb6b..9ab3111b528 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.round_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.round_.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.Tensor.round_ - +## [ torch 参数更多 ]torch.Tensor.round_ ### [torch.Tensor.round_](https://pytorch.org/docs/stable/generated/torch.Tensor.round_.html#torch.Tensor.round_) - ```python torch.Tensor.round_(decimals=0) ``` ### [paddle.Tensor.round_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#round-name-none) - ```python paddle.Tensor.round_(name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.round_(name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------- | ------- | | decimals | - | 舍入小数位数 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.stft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.stft.md index 2e639856a78..6b2b3221282 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.stft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.stft.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.Tensor.stft - +## [ torch 参数更多 ]torch.Tensor.stft ### [torch.Tensor.stft](https://pytorch.org/docs/stable/generated/torch.Tensor.stft.html#torch.Tensor.stft) - ```python torch.Tensor.stft(n_fft, hop_length=None, win_length=None, window=None, center=True, pad_mode='reflect', normalized=False, onesided=None, return_complex=None) ``` ### [paddle.Tensor.stft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/signal/stft_cn.html) - ```python paddle.Tensor.stft(n_fft, hop_length=None, win_length=None, window=None, center=True, pad_mode='reflect', normalized=False, onesided=True, name=None) ``` @@ -15,7 +12,6 @@ paddle.Tensor.stft(n_fft, hop_length=None, win_length=None, window=None, center= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | ------- | | n_fft | n_fft | 离散傅里叶变换的样本点个数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.symeig.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.symeig.md index a2ca327c419..d43b3b5fd60 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.symeig.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.symeig.md @@ -1,14 +1,11 @@ -## [torch 参数更多]torch.Tensor.symeig - +## [ torch 参数更多 ]torch.Tensor.symeig ### [torch.Tensor.symeig](https://pytorch.org/docs/stable/generated/torch.Tensor.symeig.html#torch.Tensor.symeig) - ```python # pytorch1.9 以上版本不支持 torch.Tensor.symeig(eigenvectors=False, upper=True) ``` ### [paddle.linalg.eigh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/eigh_cn.html) - ```python # eigenvectors 为 True paddle.linalg.eigh(x, UPLO='L', name=None) @@ -20,7 +17,6 @@ paddle.linalg.eigvalsh(x, UPLO='L', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------ | | - | x | 表示输入的 Tensor 。 | @@ -28,7 +24,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | upper | UPLO | 表示计算上三角或者下三角矩阵,PyTorch 取值 bool 类型,Paddle 取值 L, U。 | ### 转写示例 - #### eigenvectors:表示是否计算特征向量 ```python # PyTorch 写法,eigenvectors 为 False diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.to_sparse_csr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.to_sparse_csr.md index 0d85dcda833..49d80b66923 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.to_sparse_csr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.to_sparse_csr.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.Tensor.to_sparse_csr - +## [ torch 参数更多 ]torch.Tensor.to_sparse_csr ### [torch.Tensor.to_sparse_csr](https://pytorch.org/docs/stable/generated/torch.Tensor.to_sparse_csr.html#torch-tensor-to-sparse-csr) - ```python torch.Tensor.to_sparse_csr(dense_dim=None) ``` ### [paddle.Tensor.to_sparse_csr](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#tensor) - ```python paddle.Tensor.to_sparse_csr() ``` @@ -15,7 +12,6 @@ paddle.Tensor.to_sparse_csr() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------------------- | | dense_dim | - | 控制稀疏 CSR 张量中稠密部分的维度, Paddle 无此参数,暂无转写方式。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.type.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.type.md index a1024ed29c9..e7cb5a0573a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.type.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.type.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.Tensor.type - +## [ torch 参数更多 ]torch.Tensor.type ### [torch.Tensor.type](https://pytorch.org/docs/stable/generated/torch.Tensor.type.html#torch.Tensor.type) - ```python torch.Tensor.type(dtype=None, non_blocking=False, **kwargs) ``` ### [paddle.Tensor.astype](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#astype-dtype) - ```python paddle.Tensor.astype(dtype) ``` @@ -15,7 +12,6 @@ paddle.Tensor.astype(dtype) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------ | | dtype | dtype | 转换后的 dtype。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.unique.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.unique.md index b68477f8981..4087741a671 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.unique.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.Tensor.unique.md @@ -1,12 +1,10 @@ -## [torch 参数更多] torch.Tensor.unique +## [ torch 参数更多 ]torch.Tensor.unique ### [torch.Tensor.unique](https://pytorch.org/docs/stable/generated/torch.Tensor.unique.html?highlight=unique#torch.Tensor.unique) - ```python torch.Tensor.unique(sorted=True, return_inverse=False, return_counts=False, dim=None) ``` ### [paddle.Tensor.unique](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#unique-return-index-false-return-inverse-false-return-counts-false-axis-none-dtype-int64-name-none) - ```python paddle.Tensor.unique(return_index=False, return_inverse=False, return_counts=False, axis=None, dtype='int64', name=None) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.abs.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.abs.md index 092844393c7..ddb99d786c2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.abs.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.abs.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.abs - +## [ torch 参数更多 ]torch.abs ### [torch.abs](https://pytorch.org/docs/stable/generated/torch.abs.html?highlight=abs#torch.abs) - ```python torch.abs(input, *, @@ -9,7 +7,6 @@ torch.abs(input, ``` ### [paddle.abs](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/abs_cn.html#abs) - ```python paddle.abs(x, name=None) @@ -18,7 +15,6 @@ paddle.abs(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | @@ -26,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.acos.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.acos.md index 8f8b2e2ac2a..558a7e89e61 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.acos.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.acos.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.acos - +## [ torch 参数更多 ]torch.acos ### [torch.acos](https://pytorch.org/docs/stable/generated/torch.acos.html?highlight=acos#torch.acos) - ```python torch.acos(input, *, @@ -9,7 +7,6 @@ torch.acos(input, ``` ### [paddle.acos](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/acos_cn.html#acos) - ```python paddle.acos(x, name=None) @@ -18,16 +15,13 @@ paddle.acos(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.acos(torch.tensor([0.3348, -0.5889]), out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.acosh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.acosh.md index 23c1fb96dfa..44d2bcfc36d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.acosh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.acosh.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.acosh - +## [ torch 参数更多 ]torch.acosh ### [torch.acosh](https://pytorch.org/docs/stable/generated/torch.acosh.html?highlight=acosh#torch.acosh) - ```python torch.acosh(input, *, @@ -9,7 +7,6 @@ torch.acosh(input, ``` ### [paddle.acosh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/acosh_cn.html#acos) - ```python paddle.acosh(x, name=None) @@ -18,7 +15,6 @@ paddle.acosh(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.acosh(torch.tensor([1.3192, 1.9915]), out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.addmm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.addmm.md index da5dd88cc3a..81b487f0904 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.addmm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.addmm.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.addmm - +## [ torch 参数更多 ]torch.addmm ### [torch.addmm](https://pytorch.org/docs/stable/generated/torch.addmm.html?highlight=addmm#torch.addmm) - ```python torch.addmm(input,mat1,mat2,*,beta=1,alpha=1,out=None) ``` ### [paddle.addmm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/addmm_cn.html) - ```python paddle.addmm(input,x,y,alpha=1.0,beta=1.0,name=None) ``` @@ -15,7 +12,6 @@ paddle.addmm(input,x,y,alpha=1.0,beta=1.0,name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------- | ------- | | input | input | 表示输入的 Tensor 。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out: 输出的 Tensor - ```python # PyTorch 写法 torch.addmm(input,x,y,beta,alpha,out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.amp.autocast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.amp.autocast.md index 21a431eaebe..c446841c6af 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.amp.autocast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.amp.autocast.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.amp.autocast - +## [ torch 参数更多 ]torch.amp.autocast ### [torch.amp.autocast](https://pytorch.org/docs/stable/amp.html#torch.cuda.amp.autocast) - ```python torch.amp.autocast(device_type, dtype=None, @@ -10,7 +8,6 @@ torch.amp.autocast(device_type, ``` ### [paddle.amp.auto_cast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/auto_cast_cn.html#auto-cast) - ```python paddle.amp.auto_cast(enable=True, custom_white_list=None, @@ -23,7 +20,6 @@ paddle.amp.auto_cast(enable=True, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------ | ------------------------------------------------------------ | | device_type | - | 指定设备类型,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.angle.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.angle.md index 914d48185f8..7f01712162c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.angle.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.angle.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.angle - ### [torch.angle](https://pytorch.org/docs/stable/generated/torch.angle.html) - ```python torch.angle(input, *, out=None) ``` ### [paddle.angle](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/angle_cn.html#angle) - ```python paddle.angle(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.angle(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | input | x | 输入 Tensor,仅参数名不一致。 | | out | - | 输出 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out: 指定输出 - ```python # PyTorch 写法 torch.angle(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.asin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.asin.md index c7134ea904e..3feeb140517 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.asin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.asin.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.asin +## [ torch 参数更多 ]torch.asin ### [torch.asin](https://pytorch.org/docs/stable/generated/torch.asin.html#torch.asin) - ```python torch.asin(input, *, @@ -8,7 +7,6 @@ torch.asin(input, ``` ### [paddle.asin](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/asin_cn.html#asin) - ```python paddle.asin(x, name=None) @@ -16,7 +14,6 @@ paddle.asin(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.asinh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.asinh.md index b0245921ffd..764f3736c26 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.asinh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.asinh.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.asinh +## [ torch 参数更多 ]torch.asinh ### [torch.asinh](https://pytorch.org/docs/stable/generated/torch.asinh.html#torch.asinh) - ```python torch.asinh(input, *, @@ -8,7 +7,6 @@ torch.asinh(input, ``` ### [paddle.asinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/asinh_cn.html) - ```python paddle.asinh(x, name=None) @@ -16,7 +14,6 @@ paddle.asinh(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atan.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atan.md index 973bf93c745..1c5a5db638d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atan.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atan.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.atan +## [ torch 参数更多 ]torch.atan ### [torch.atan](https://pytorch.org/docs/stable/generated/torch.atan.html#torch.atan) - ```python torch.atan(input, *, @@ -8,7 +7,6 @@ torch.atan(input, ``` ### [paddle.atan](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/atan_cn.html#atan) - ```python paddle.atan(x, name=None) @@ -17,7 +15,6 @@ paddle.atan(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atan2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atan2.md index f8abef48d5f..3e257ced49f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atan2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atan2.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.atan2 +## [ torch 参数更多 ]torch.atan2 ### [torch.atan2](https://pytorch.org/docs/stable/generated/torch.atan2.html#torch.atan2) - ```python torch.atan2(input, other, @@ -9,7 +8,6 @@ torch.atan2(input, ``` ### [paddle.atan2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/atan2_cn.html) - ```python paddle.atan2(x, y, @@ -19,7 +17,6 @@ paddle.atan2(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atanh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atanh.md index d4db65457b1..824c279bc0c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atanh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.atanh.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.atanh +## [ torch 参数更多 ]torch.atanh ### [torch.atanh](https://pytorch.org/docs/stable/generated/torch.atanh.html#torch.atanh) - ```python torch.atanh(input, *, @@ -8,7 +7,6 @@ torch.atanh(input, ``` ### [paddle.atanh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/atanh_cn.html) - ```python paddle.atanh(x, name=None) @@ -17,7 +15,6 @@ paddle.atanh(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autocast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autocast.md index 0868b0e5375..2e9e8a04223 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autocast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autocast.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.autocast - +## [ torch 参数更多 ]torch.autocast ### [torch.autocast](https://pytorch.org/docs/stable/amp.html?highlight=autocast#torch.autocast) - ```python torch.autocast(device_type, dtype=None, enabled=True, cache_enabled=None) ``` ### [paddle.amp.auto_cast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/amp/auto_cast_cn.html) - ```python paddle.amp.auto_cast(enable=True, custom_white_list=None, custom_black_list=None, level='O1', dtype='float16', use_promote=True) ``` @@ -15,7 +12,6 @@ paddle.amp.auto_cast(enable=True, custom_white_list=None, custom_black_list=None 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | device_type | - | 设备类型,Paddle 不区分设备,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.backward.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.backward.md index f961b9e7c90..6f273898725 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.backward.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.backward.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.autograd.backward - +## [ torch 参数更多 ]torch.autograd.backward ### [torch.autograd.backward](https://pytorch.org/docs/stable/generated/torch.autograd.backward.html#torch.autograd.backward) - ```python torch.autograd.backward(tensors, grad_tensors=None, retain_graph=None, create_graph=False, grad_variables=None, inputs=None) ``` ### [paddle.autograd.backward](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/autograd/backward_cn.html) - ```python paddle.autograd.backward(tensors, grad_tensors=None, retain_graph=False) ``` @@ -15,7 +12,6 @@ paddle.autograd.backward(tensors, grad_tensors=None, retain_graph=False) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------- | | tensors | tensors | 将要计算梯度的 Tensors 列表。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.hessian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.hessian.md index 255e0af87c2..b3cca7de240 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.hessian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.hessian.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.autograd.functional.hessian - +## [ torch 参数更多 ]torch.autograd.functional.hessian ### [torch.autograd.functional.hessian](https://pytorch.org/docs/stable/generated/torch.autograd.functional.hessian.html#torch.autograd.functional.hessian) - ```python torch.autograd.functional.hessian(func, inputs, create_graph=False, strict=False, vectorize=False, outer_jacobian_strategy='reverse-mode') ``` ### [paddle.incubate.autograd.Hessian](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/incubate/autograd/Hessian_cn.html) - ```python paddle.incubate.autograd.Hessian(func, xs, is_batched=False) ``` @@ -15,7 +12,6 @@ paddle.incubate.autograd.Hessian(func, xs, is_batched=False) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------- | ------------ | ------------------------------------------------------------------- | | func | func | Python 函数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.jacobian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.jacobian.md index 4db0c7c6fea..048e7942587 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.jacobian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.jacobian.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.autograd.functional.jacobian - +## [ torch 参数更多 ]torch.autograd.functional.jacobian ### [torch.autograd.functional.jacobian](https://pytorch.org/docs/stable/generated/torch.autograd.functional.jacobian.html#torch.autograd.functional.jacobian) - ```python torch.autograd.functional.jacobian(func, inputs, create_graph=False, strict=False, vectorize=False, strategy='reverse-mode') ``` ### [paddle.incubate.autograd.Jacobian](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/incubate/autograd/Jacobian_cn.html) - ```python paddle.incubate.autograd.Jacobian(func, xs, is_batched=False) ``` @@ -15,7 +12,6 @@ paddle.incubate.autograd.Jacobian(func, xs, is_batched=False) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------------- | | func | func | Python 函数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.jvp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.jvp.md index dcb94477a48..4e6a584f76c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.jvp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.jvp.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.autograd.functional.jvp - +## [ torch 参数更多 ]torch.autograd.functional.jvp ### [torch.autograd.functional.jvp](https://pytorch.org/docs/stable/generated/torch.autograd.functional.jvp.html#torch.autograd.functional.jvp) - ```python torch.autograd.functional.jvp(func, inputs, v=None, create_graph=False, strict=False) ``` ### [paddle.incubate.autograd.jvp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/incubate/autograd/jvp_cn.html) - ```python paddle.incubate.autograd.jvp(func, xs, v=None) ``` @@ -15,7 +12,6 @@ paddle.incubate.autograd.jvp(func, xs, v=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------------- | | func | func | Python 函数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.vjp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.vjp.md index 82b105d884e..e3b7942b004 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.vjp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.functional.vjp.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.autograd.functional.vjp - +## [ torch 参数更多 ]torch.autograd.functional.vjp ### [torch.autograd.functional.vjp](https://pytorch.org/docs/stable/generated/torch.autograd.functional.vjp.html#torch.autograd.functional.vjp) - ```python torch.autograd.functional.vjp(func, inputs, v=None, create_graph=False, strict=False) ``` ### [paddle.incubate.autograd.vjp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/incubate/autograd/vjp_cn.html) - ```python paddle.incubate.autograd.vjp(func, xs, v=None) ``` @@ -15,7 +12,6 @@ paddle.incubate.autograd.vjp(func, xs, v=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------------- | | func | func | Python 函数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.grad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.grad.md index 0fe5fcbe8ed..f726421e1e9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.grad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.autograd.grad.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.autograd.grad - +## [ torch 参数更多 ]torch.autograd.grad ### [torch.autograd.grad](https://pytorch.org/docs/stable/generated/torch.autograd.grad.html#torch.autograd.grad) - ```python torch.autograd.grad(outputs, inputs, grad_outputs=None, retain_graph=None, create_graph=False, only_inputs=True, allow_unused=False, is_grads_batched=False, materialize_grads=False) ``` ### [paddle.grad](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/grad_cn.html) - ```python paddle.grad(outputs, inputs, grad_outputs=None, retain_graph=None, create_graph=False, only_inputs=True, allow_unused=False, no_grad_vars=None) ``` @@ -15,7 +12,6 @@ paddle.grad(outputs, inputs, grad_outputs=None, retain_graph=None, create_graph= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------------- | ------------ | ------------------------------------------------------------ | | outputs | outputs | 用于计算梯度的图的输出变量。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.baddbmm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.baddbmm.md index 51d2e738ae2..313832cef21 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.baddbmm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.baddbmm.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.baddbmm - +## [ torch 参数更多 ]torch.baddbmm ### [torch.baddbmm](https://pytorch.org/docs/stable/generated/torch.baddbmm.html?highlight=baddbmm#torch.baddbmm) - ```python torch.baddbmm(input, batch1, batch2, beta=1, alpha=1, out=None) ``` ### [paddle.baddbmm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/baddbmm_cn.html) - ```python paddle.baddbmm(input, x, y, alpha=1.0, beta=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.baddbmm(input, x, y, alpha=1.0, beta=1.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------- | ------- | | input | input | 表示输入的 Tensor 。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out: 输出的 Tensor - ```python # PyTorch 写法 torch.baddbmm(input, batch1, batch2, beta, alpha, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.bernoulli.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.bernoulli.md index 5558b506f73..0ee3f076600 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.bernoulli.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.bernoulli.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.bernoulli - ### [torch.bernoulli](https://pytorch.org/docs/stable/generated/torch.bernoulli.html#torch.bernoulli) - ```python torch.bernoulli(input, p=None, @@ -11,7 +9,6 @@ torch.bernoulli(input, ``` ### [paddle.bernoulli](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/bernoulli_cn.html) - ```python paddle.bernoulli(x, p=None, @@ -21,7 +18,6 @@ paddle.bernoulli(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 伯努利参数 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.blackman_window.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.blackman_window.md index 4c3a7f76291..f07cc5eb09f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.blackman_window.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.blackman_window.md @@ -1,20 +1,16 @@ -## [ torch 参数更多 ] torch.blackman_window - +## [ torch 参数更多 ]torch.blackman_window ### [torch.blackman_window](https://pytorch.org/docs/stable/generated/torch.blackman_window.html) - ```python torch.blackman_window(window_length, periodic=True, *, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `blackman`。 | @@ -26,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.bucketize.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.bucketize.md index 96a1b212741..c7c9d67d57c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.bucketize.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.bucketize.md @@ -1,19 +1,16 @@ -## [torch 参数更多 ] torch.bucketize +## [ torch 参数更多 ]torch.bucketize ### [torch.bucketize](https://pytorch.org/docs/stable/generated/torch.bucketize.html#torch.bucketize) - ```python torch.bucketize(input, boundaries, *, out_int32=False, right=False, out=None) ``` ### [paddle.bucketize](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/bucketize_cn.html#paddle-bucketize) - ```python paddle.bucketize(x, sorted_sequence, out_int32=False, right=False, name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input| x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cholesky.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cholesky.md index d5ed69506f4..b61b882922a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cholesky.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cholesky.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.cholesky - +## [ torch 参数更多 ]torch.cholesky ### [torch.cholesky](https://pytorch.org/docs/stable/generated/torch.cholesky.html?highlight=cholesky#torch.cholesky) - ```python torch.cholesky(input,upper=False,*,out=None) ``` ### [paddle.linalg.cholesky](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/cholesky_cn.html) - ```python paddle.linalg.cholesky(x,upper=False,name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.cholesky(x,upper=False,name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------- | ------- | | input | x | 表示输入参数为多维 Tensor ,它的维度应该为 [*, M, N],其中*为零或更大的批次尺寸,并且最里面的两个维度上的矩阵都应为对称的正定矩阵,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor, Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:输出的 Tensor - ```python # PyTorch 写法 torch.cholesky(x, upper=False, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cholesky_inverse.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cholesky_inverse.md index b0f37cf1439..8945f9b625a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cholesky_inverse.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cholesky_inverse.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.cholesky_inverse - ### [torch.cholesky_inverse](https://pytorch.org/docs/stable/generated/torch.cholesky_inverse.html?highlight=cholesky_inverse#torch.cholesky_inverse) - ```python torch.cholesky_inverse(input, upper=False, out=None) ``` ### [paddle.linalg.cholesky_inverse](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/cholesky_inverse_cn.html#cholesky-inverse) - ```python paddle.linalg.cholesky_inverse(x, upper=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.cholesky_inverse(x, upper=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -23,7 +19,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - ```python # PyTorch 写法 torch.cholesky_inverse(input, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clamp_max.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clamp_max.md index 9fd7f9b07f9..cae83012915 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clamp_max.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clamp_max.md @@ -1,6 +1,6 @@ ## [ torch 参数更多 ]torch.clamp_max -### [torch.clamp_max]() +### [torch.clamp_max]() ```python torch.clamp_max(input, max=None, @@ -9,7 +9,6 @@ torch.clamp_max(input, ``` ### [paddle.clip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/clip_cn.html#clip) - ```python paddle.clip(x, min=None, @@ -19,7 +18,6 @@ paddle.clip(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clamp_min.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clamp_min.md index ec4594608b5..56f4411cee6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clamp_min.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clamp_min.md @@ -1,6 +1,6 @@ ## [ torch 参数更多 ]torch.clamp_min -### [torch.clamp_min]() +### [torch.clamp_min]() ```python torch.clamp_min(input, min=None, @@ -9,7 +9,6 @@ torch.clamp_min(input, ``` ### [paddle.clip](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/clip_cn.html#clip) - ```python paddle.clip(x, min=None, @@ -19,7 +18,6 @@ paddle.clip(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clone.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clone.md index 2001d177b65..380503e28e3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clone.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.clone.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.clone - +## [ torch 参数更多 ]torch.clone ### [torch.clone](https://pytorch.org/docs/stable/generated/torch.clone.html?highlight=clone#torch.clone) - ```python torch.clone(input, *, @@ -9,7 +7,6 @@ torch.clone(input, ``` ### [paddle.clone](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/clone_cn.html#clone) - ```python paddle.clone(x, name=None) @@ -18,7 +15,6 @@ paddle.clone(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.column_stack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.column_stack.md index 777c2f06c2d..cec45b37644 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.column_stack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.column_stack.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.column_stack - ### [torch.column_stack](https://pytorch.org/docs/stable/generated/torch.column_stack.html#torch.column_stack) - ```python torch.column_stack(tensors, *, out=None) ``` ### [paddle.column_stack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/column_stack_cn.html) - ```python paddle.column_stack(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.column_stack(x, name=None) 其中 Paddle 相比 PyTorch 仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.conj_physical.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.conj_physical.md index c7eddfef306..2096cbd40e0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.conj_physical.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.conj_physical.md @@ -1,12 +1,11 @@ -## [ torch 参数更多]torch.conj_physical -### [torch.conj_physical](https://pytorch.org/docs/stable/generated/torch.conj_physical.html#torch.conj_physical) +## [ torch 参数更多 ]torch.conj_physical +### [torch.conj_physical](https://pytorch.org/docs/stable/generated/torch.conj_physical.html#torch.conj_physical) ```python torch.conj_physical(input, *, out=None) ``` ### [paddle.conj](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/conj_cn.html#conj) - ```python paddle.conj(x, name=None) @@ -14,7 +13,6 @@ paddle.conj(x, PyTorch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.copysign.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.copysign.md index 03f2b9611a8..d705b123189 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.copysign.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.copysign.md @@ -1,6 +1,6 @@ ## [ torch 参数更多 ]torch.copysign -### [torch.copysign](https://pytorch.org/docs/stable/generated/torch.copysign.html#torch.copysign) +### [torch.copysign](https://pytorch.org/docs/stable/generated/torch.copysign.html#torch.copysign) ```python torch.copysign(input, other, @@ -9,14 +9,13 @@ torch.copysign(input, ``` ### [paddle.copysign](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/copysign_cn.html#copysign) - ```python paddle.copysign(x, y) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: -### 参数映射 +### 参数映射 | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的第一个张量,表示输出的大小,仅参数名不一致。 | @@ -24,7 +23,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cosh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cosh.md index 84cb7000349..be699681f92 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cosh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cosh.md @@ -1,6 +1,6 @@ ## [ torch 参数更多 ]torch.cosh -### [torch.cosh](https://pytorch.org/docs/stable/generated/torch.cosh.html#torch.cosh) +### [torch.cosh](https://pytorch.org/docs/stable/generated/torch.cosh.html#torch.cosh) ```python torch.cosh(input, *, @@ -8,7 +8,6 @@ torch.cosh(input, ``` ### [paddle.cosh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cosh_cn.html#cosh) - ```python paddle.cosh(x, name=None) @@ -16,7 +15,6 @@ paddle.cosh(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cross.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cross.md index d899de4fde6..56e5597aaab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cross.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cross.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.cross - +## [ torch 参数更多 ]torch.cross ### [torch.cross](https://pytorch.org/docs/stable/generated/torch.cross.html?highlight=cross#torch.cross) - ```python torch.cross(input, other, @@ -11,7 +9,6 @@ torch.cross(input, ``` ### [paddle.cross](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cross_cn.html#cross) - ```python paddle.cross(x, y, @@ -22,7 +19,6 @@ paddle.cross(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cuda.comm.broadcast.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cuda.comm.broadcast.md index 8df2d807489..8f3dcc57185 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cuda.comm.broadcast.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cuda.comm.broadcast.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.cuda.comm.broadcast - +## [ torch 参数更多 ]torch.cuda.comm.broadcast ### [torch.cuda.comm.broadcast](https://pytorch.org/docs/stable/generated/torch.cuda.comm.broadcast.html#torch.cuda.comm.broadcast) - ```python torch.cuda.comm.broadcast(tensor, devices=None, *, out=None) ``` ### [paddle.distributed.broadcast](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/broadcast_cn.html) - ```python paddle.distributed.broadcast(tensor, src, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.broadcast(tensor, src, group=None, sync_op=True) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------ | | tensor | tensor | 在目标进程上为待广播的 tensor,在其他进程上为用于接收广播结果的 tensor。 | @@ -25,7 +21,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | sync_op | 该操作是否为同步操作。默认为 True,即同步操作。PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### out 参数:指定输出 ``` python # PyTorch 写法: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cummax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cummax.md index eaec3b541ad..913d6dfa75f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cummax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cummax.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.cummax - ### [torch.cummax](https://pytorch.org/docs/stable/generated/torch.cummax.html?highlight=cummax#torch.cummax) - ```python torch.cummax(input, dim, @@ -10,7 +8,6 @@ torch.cummax(input, ``` ### [paddle.cummax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cummax_cn.html#cummax) - ```python paddle.cummax(x, axis=None, @@ -21,7 +18,6 @@ paddle.cummax(x, 两者功能一致,torch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | @@ -31,7 +27,6 @@ paddle.cummax(x, ### 转写示例 #### out:指定输出 - ```python # PyTorch 写法 torch.cummax(x,1, out=(values, indices)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cummin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cummin.md index 0542cb71299..2862a77518d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cummin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cummin.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.cummin - ### [torch.cummin](https://pytorch.org/docs/stable/generated/torch.cummin.html) - ```python torch.cummin(input, dim, @@ -10,7 +8,6 @@ torch.cummin(input, ``` ### [paddle.cummin](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cummin_cn.html) - ```python paddle.cummin(x, axis=None, @@ -21,7 +18,6 @@ paddle.cummin(x, 两者功能一致,torch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | @@ -31,7 +27,6 @@ paddle.cummin(x, ### 转写示例 #### out:指定输出 - ```python # PyTorch 写法 torch.cummin(x,1, out=(values, indices)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cumprod.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cumprod.md index 915e24c0649..f021a9e381c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cumprod.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.cumprod.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.cumprod - +## [ torch 参数更多 ]torch.cumprod ### [torch.cumprod](https://pytorch.org/docs/stable/generated/torch.cumprod.html?highlight=cumprod#torch.cumprod) - ```python torch.cumprod(input, dim, @@ -11,7 +9,6 @@ torch.cumprod(input, ``` ### [paddle.cumprod](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cumprod_cn.html#cumprod) - ```python paddle.cumprod(x, dim=None, @@ -22,7 +19,6 @@ paddle.cumprod(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------| | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.deg2rad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.deg2rad.md index 82a15bb8ff9..225b4432837 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.deg2rad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.deg2rad.md @@ -1,6 +1,6 @@ ## [ torch 参数更多 ]torch.deg2rad -### [torch.deg2rad](https://pytorch.org/docs/stable/generated/torch.deg2rad.html#torch-deg2rad) +### [torch.deg2rad](https://pytorch.org/docs/stable/generated/torch.deg2rad.html#torch-deg2rad) ```python torch.deg2rad(input, *, @@ -8,7 +8,6 @@ torch.deg2rad(input, ``` ### [paddle.deg2rad](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/deg2rad_cn.html#paddle.deg2rad) - ```python paddle.deg2rad(x, name=None) @@ -16,7 +15,6 @@ paddle.deg2rad(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.diag.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.diag.md index a46de2b69ba..2f333476b6d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.diag.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.diag.md @@ -1,6 +1,6 @@ -## [torch 参数更多 ]torch.diag -### [torch.diag](https://pytorch.org/docs/stable/generated/torch.diag.html?highlight=diag#torch.diag) +## [ torch 参数更多 ]torch.diag +### [torch.diag](https://pytorch.org/docs/stable/generated/torch.diag.html?highlight=diag#torch.diag) ```python torch.diag(input, diagonal=0, @@ -9,7 +9,6 @@ torch.diag(input, ``` ### [paddle.diag](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/diag_cn.html) - ```python paddle.diag(x, offset=0, @@ -20,7 +19,6 @@ paddle.diag(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.P2POp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.P2POp.md index a25fb608ff5..ba4cfb271c2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.P2POp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.P2POp.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.P2POp - +## [ torch 参数更多 ]torch.distributed.P2POp ### [torch.distributed.P2POp](https://pytorch.org/docs/stable/distributed.html#torch.distributed.P2POp) - ```python torch.distributed.P2POp(op, tensor, peer, group=None, tag=0) ``` ### [paddle.distributed.P2POp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/Overview_cn.html#paddle-distributed) - ```python paddle.distributed.P2POp(op, tensor, peer, group=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.P2POp(op, tensor, peer, group=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | --------------- | ----------------------------------------------------------------- | | op | op | 表示操作类型。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.ReduceOp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.ReduceOp.md index 975d7b63d6e..4680705595e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.ReduceOp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.ReduceOp.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.ReduceOp - +## [ torch 参数更多 ]torch.distributed.ReduceOp ### [torch.distributed.ReduceOp](https://pytorch.org/docs/stable/distributed.html?highlight=torch+distributed+reduceop#torch.distributed.ReduceOp) - ```python torch.distributed.ReduceOp ``` ### [paddle.distributed.ReduceOp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/ReduceOp_cn.html) - ```python paddle.distributed.ReduceOp ``` @@ -17,7 +14,6 @@ paddle.distributed.ReduceOp 其中,规约操作对应如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---- | ---- | --- | | SUM | SUM | | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.barrier.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.barrier.md index 0141858022b..4086edef5fe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.barrier.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.barrier.md @@ -1,12 +1,11 @@ -## [ torch 参数更多 ] torch.distributed.barrier -### [torch.distributed.barrier](https://pytorch.org/docs/stable/distributed.html?highlight=barrier#torch.distributed.barrier) +## [ torch 参数更多 ]torch.distributed.barrier +### [torch.distributed.barrier](https://pytorch.org/docs/stable/distributed.html?highlight=barrier#torch.distributed.barrier) ```python torch.distributed.barrier(group=None, async_op=False, device_ids=None) ``` ### [paddle.distributed.barrier](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/barrier_cn.html) - ```python paddle.distributed.barrier(group=None) ``` @@ -14,7 +13,6 @@ paddle.distributed.barrier(group=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------| | group | group | 进程组编号。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.broadcast_object_list.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.broadcast_object_list.md index 33dbb6b7421..1a5a6b63140 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.broadcast_object_list.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.broadcast_object_list.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.broadcast_object_list - +## [ torch 参数更多 ]torch.distributed.broadcast_object_list ### [torch.distributed.broadcast_object_list](https://pytorch.org/docs/stable/distributed.html?highlight=broadcast_object_list#torch.distributed.broadcast_object_list) - ```python torch.distributed.broadcast_object_list(object_list, src=0, group=None, device=None) ``` ### [paddle.distributed.broadcast_object_list](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distributed/broadcast_object_list_cn.html) - ```python paddle.distributed.broadcast_object_list(object_list, src, group=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.broadcast_object_list(object_list, src, group=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | --------------- | ----------------------------------------------------------------- | | object_list | object_list | 表示在目标进程上为待广播的 object 列表,在其他进程上为用于接收广播结果的 object 列表。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.init_process_group.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.init_process_group.md index 4acdd13c9f3..50d4f721223 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.init_process_group.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.init_process_group.md @@ -1,12 +1,10 @@ -## [ torch 参数更多 ] torch.distributed.init_process_group +## [ torch 参数更多 ]torch.distributed.init_process_group ### [torch.distributed.init_process_group](https://pytorch.org/docs/stable/distributed.html?highlight=init_process#torch.distributed.init_process_group) - ```python torch.distributed.init_process_group(backend='nccl', init_method=None, timeout=datetime.timedelta(seconds=1800), world_size=-1, rank=-1, store=None, group_name='', pg_options=None) ``` ### [paddle.distributed.init_parallel_env](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/init_parallel_env_cn.html) - ```python paddle.distributed.init_parallel_env() ``` @@ -14,7 +12,6 @@ paddle.distributed.init_parallel_env() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | backend | - | backend 配置,paddle 无此参数,暂无转写方式。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.irecv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.irecv.md index 2ccfb96bf0a..db61ddc4e31 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.irecv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.irecv.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.irecv - +## [ torch 参数更多 ]torch.distributed.irecv ### [torch.distributed.irecv](https://pytorch.org/docs/stable/distributed.html?highlight=send#torch.distributed.irecv) - ```python torch.distributed.irecv(tensor, src=None, group=None, tag=0) ``` ### [paddle.distributed.irecv](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distributed/irecv_cn.html) - ```python paddle.distributed.irecv(tensor, src=0, group=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.irecv(tensor, src=0, group=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | --------------- | ----------------------------------------------------------------- | | tensor | tensor | 表示用于接收数据的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.isend.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.isend.md index e5b5cbcabac..fb06a3cb4a6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.isend.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.isend.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.isend - +## [ torch 参数更多 ]torch.distributed.isend ### [torch.distributed.isend](https://pytorch.org/docs/stable/distributed.html#torch.distributed.isend) - ```python torch.distributed.isend(tensor, dst, group=None, tag=0) ``` ### [paddle.distributed.isend](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distributed/isend_cn.html) - ```python paddle.distributed.isend(tensor, dst=0, group=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.isend(tensor, dst=0, group=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | --------------- | ----------------------------------------------------------------- | | tensor | tensor | 表示待发送的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.monitored_barrier.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.monitored_barrier.md index 12de62e200b..7e91b8cc46a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.monitored_barrier.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.monitored_barrier.md @@ -1,12 +1,10 @@ -## [ torch 参数更多 ] torch.distributed.monitored_barrier +## [ torch 参数更多 ]torch.distributed.monitored_barrier ### [torch.distributed.monitored_barrier](https://pytorch.org/docs/stable/distributed.html#torch.distributed.monitored_barrier) - ```python torch.distributed.monitored_barrier(group=None, timeout=None, wait_all_ranks=False) ``` ### [paddle.distributed.barrier](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/barrier_cn.html) - ```python paddle.distributed.barrier(group=None) ``` @@ -14,7 +12,6 @@ paddle.distributed.barrier(group=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------| | group | group | 进程组编号。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.new_group.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.new_group.md index 768cf5189e2..221ab964942 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.new_group.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.new_group.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.new_group - +## [ torch 参数更多 ]torch.distributed.new_group ### [torch.distributed.new_group](https://pytorch.org/docs/stable/distributed.html#torch.distributed.new_group) - ```python torch.distributed.new_group(ranks=None, timeout=datetime.timedelta(seconds=1800), backend=None, pg_options=None) ``` ### [paddle.distributed.new_group](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/new_group_cn.html) - ```python paddle.distributed.new_group(ranks=None, backend=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.new_group(ranks=None, backend=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | ----------------------------------------- | | ranks | ranks | 用于新建通信组的全局 rank 列表。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.recv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.recv.md index a629bf3263c..262df8497cf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.recv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.recv.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.recv - +## [ torch 参数更多 ]torch.distributed.recv ### [torch.distributed.recv](https://pytorch.org/docs/stable/distributed.html#torch.distributed.recv) - ```python torch.distributed.recv(tensor, src=None, group=None, tag=0) ``` ### [paddle.distributed.recv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/recv_cn.html) - ```python paddle.distributed.recv(tensor, src=0, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.recv(tensor, src=0, group=None, sync_op=True) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | --------------- | ----------------------------------------------------------------- | | tensor | tensor | 表示用于接收数据的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.rpc.init_rpc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.rpc.init_rpc.md index 67615e86135..f21bbb5f10a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.rpc.init_rpc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.rpc.init_rpc.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributed.rpc.init_rpc - ### [torch.distributed.rpc.init\_rpc](https://pytorch.org/docs/stable/rpc.html#torch.distributed.rpc.init_rpc) - ```python torch.distributed.rpc.init_rpc(name, backend=None, rank=-1, world_size=None, rpc_backend_options=None) ``` ### [paddle.distributed.rpc.init\_rpc](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/rpc/init_rpc_cn.html#init-rpc) - ```python paddle.distributed.rpc.init_rpc(name, rank=None, world_size=None, master_endpoint=None) ``` @@ -15,7 +12,6 @@ paddle.distributed.rpc.init_rpc(name, rank=None, world_size=None, master_endpoin PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------- | ------------------- | -- | | name | name | worker 名字。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.rpc.shutdown.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.rpc.shutdown.md index 4fbbcf9d2c2..f4af81e4a27 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.rpc.shutdown.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.rpc.shutdown.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.rpc.shutdown - +## [ torch 参数更多 ]torch.distributed.rpc.shutdown ### [torch.distributed.rpc.shutdown](https://pytorch.org/docs/stable/rpc.html#torch.distributed.rpc.shutdown) - ```python torch.distributed.rpc.shutdown(graceful=True, timeout=0) ``` ### [paddle.distributed.rpc.shutdown](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/rpc/shutdown_cn.html) - ```python paddle.distributed.rpc.shutdown() ``` @@ -15,7 +12,6 @@ paddle.distributed.rpc.shutdown() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------- | | graceful | - | 是否优雅关闭,Paddle 无此参数,暂无转写方式。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.send.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.send.md index 1b2f69ed162..959f7a7dd6c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.send.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributed.send.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributed.send - +## [ torch 参数更多 ]torch.distributed.send ### [torch.distributed.send](https://pytorch.org/docs/stable/distributed.html#torch.distributed.send) - ```python torch.distributed.send(tensor, dst, group=None, tag=0) ``` ### [paddle.distributed.send](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/send_cn.html) - ```python paddle.distributed.send(tensor, dst=0, group=None, sync_op=True) ``` @@ -15,7 +12,6 @@ paddle.distributed.send(tensor, dst=0, group=None, sync_op=True) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | --------------- | ----------------------------------------------------------------- | | tensor | tensor | 表示待发送的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.bernoulli.Bernoulli.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.bernoulli.Bernoulli.md index 044b1a9ea73..937b15dbac2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.bernoulli.Bernoulli.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.bernoulli.Bernoulli.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.bernoulli.Bernoulli - +## [ torch 参数更多 ]torch.distributions.bernoulli.Bernoulli ### [torch.distributions.bernoulli.Bernoulli](https://pytorch.org/docs/stable/distributions.html#torch.distributions.bernoulli.Bernoulli) - ```python torch.distributions.bernoulli.Bernoulli(probs=None, logits=None, validate_args=None) ``` ### [paddle.distribution.Bernoulli](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Bernoulli_cn.html#bernoulli) - ```python paddle.distribution.Bernoulli(probs, name=None) ``` @@ -15,7 +12,6 @@ paddle.distribution.Bernoulli(probs, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------- | | probs | probs | 伯努利分布的概率输入。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.beta.Beta.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.beta.Beta.md index 2bdfe7f7753..0ae09db5a72 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.beta.Beta.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.beta.Beta.md @@ -1,13 +1,10 @@ -## [torch 参数更多 ]torch.distributions.beta.Beta - +## [ torch 参数更多 ]torch.distributions.beta.Beta ### [torch.distributions.beta.Beta](https://pytorch.org/docs/stable/distributions.html#torch.distributions.beta.Beta) - ```python torch.distributions.beta.Beta(concentration1, concentration0, validate_args=None) ``` ### [paddle.distribution.Beta](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Beta_cn.html#beta) - ```python paddle.distribution.Beta(alpha, beta) ``` @@ -15,7 +12,6 @@ paddle.distribution.Beta(alpha, beta) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------------- | | concentration1 | alpha | 表示输入的参数 ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.binomial.Binomial.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.binomial.Binomial.md index 9a74825d35a..cf9b6aee3bc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.binomial.Binomial.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.binomial.Binomial.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.distributions.binomial.Binomial - +## [ torch 参数更多 ]torch.distributions.binomial.Binomial ### [torch.distributions.binomial.Binomial](https://pytorch.org/docs/stable/distributions.html#torch.distributions.binomial.Binomial) - ```python torch.distributions.binomial.Binomial(total_count=1, probs=None, @@ -10,7 +8,6 @@ torch.distributions.binomial.Binomial(total_count=1, ``` ### [paddle.distribution.Binomial](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/distribution/Binomial_cn.html#binomial) - ```python paddle.distribution.Binomial(total_count, probs) @@ -19,7 +16,6 @@ paddle.distribution.Binomial(total_count, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------ | ------------------------------------------------------------ | | total_count | total_count | 样本大小,当 torch 不指定时,Paddle 应设置该值为 1。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.categorical.Categorical.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.categorical.Categorical.md index 1897c4eeb85..84d82c002c7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.categorical.Categorical.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.categorical.Categorical.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.categorical.Categorical - +## [ torch 参数更多 ]torch.distributions.categorical.Categorical ### [torch.distributions.categorical.Categorical](https://pytorch.org/docs/stable/distributions.html#torch.distributions.categorical.Categorical) - ```python torch.distributions.categorical.Categorical(probs=None, logits=None, validate_args=None) ``` ### [paddle.distribution.Categorical](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Categorical_cn.html) - ```python paddle.distribution.Categorical(logits, name=None) ``` @@ -15,7 +12,6 @@ paddle.distribution.Categorical(logits, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | --------------------------------------------- | | probs | - | 事件概率,Paddle 无此参数,暂无转写方式。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.cauchy.Cauchy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.cauchy.Cauchy.md index a20b12d83ed..d1b4db1e6c1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.cauchy.Cauchy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.cauchy.Cauchy.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.cauchy.Cauchy - +## [ torch 参数更多 ]torch.distributions.cauchy.Cauchy ### [torch.distributions.cauchy.Cauchy](https://pytorch.org/docs/stable/distributions.html#torch.distributions.cauchy.Cauchy) - ```python torch.distributions.cauchy.Cauchy(loc, scale, validate_args=None) ``` ### [paddle.distribution.Cauchy](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Cauchy_cn.html) - ```python paddle.distribution.Cauchy(loc, scale, name=None) ``` @@ -15,7 +12,6 @@ paddle.distribution.Cauchy(loc, scale, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------- | | loc | loc | 定义分布峰值位置的位置参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.chi2.Chi2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.chi2.Chi2.md index c11d6f0f844..4a19e62ef63 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.chi2.Chi2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.chi2.Chi2.md @@ -1,13 +1,10 @@ -## [torch 参数更多 ]torch.distributions.chi2.Chi2 - +## [ torch 参数更多 ]torch.distributions.chi2.Chi2 ### [torch.distributions.chi2.Chi2](https://pytorch.org/docs/stable/distributions.html#chi2) - ```python torch.distributions.chi2.Chi2(df, validate_args=None) ``` ### [paddle.distribution.Chi2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Chi2_cn.html#prob-value) - ```python paddle.distribution.Chi2(df) ``` @@ -15,7 +12,6 @@ paddle.distribution.Chi2(df) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ----------------------------------------------------------------------- | | df | df | 表示输入的参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.continuous_bernoulli.ContinuousBernoulli.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.continuous_bernoulli.ContinuousBernoulli.md index 1489191e278..2979e55d583 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.continuous_bernoulli.ContinuousBernoulli.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.continuous_bernoulli.ContinuousBernoulli.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.distributions.continuous_bernoulli.ContinuousBernoulli - +## [ torch 参数更多 ]torch.distributions.continuous_bernoulli.ContinuousBernoulli ### [torch.distributions.continuous_bernoulli.ContinuousBernoulli](https://pytorch.org/docs/stable/distributions.html) - ```python torch.distributions.continuous_bernoulli.ContinuousBernoulli(probs=None, logits=None, @@ -10,7 +8,6 @@ torch.distributions.continuous_bernoulli.ContinuousBernoulli(probs=None, ``` ### [paddle.distribution.ContinuousBernoulli](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/distribution/ContinuousBernoulli_cn.html#continuousbernoulli) - ```python paddle.distribution.ContinuousBernoulli(probs, lims=(0.499, 0.501)) @@ -19,7 +16,6 @@ paddle.distribution.ContinuousBernoulli(probs, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------ | ------------------------------------------------------------ | | probs | probs | 参数化分布的 (0,1) 值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.dirichlet.Dirichlet.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.dirichlet.Dirichlet.md index c03117891ea..2b3eb7847ce 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.dirichlet.Dirichlet.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.dirichlet.Dirichlet.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.dirichlet.Dirichlet - +## [ torch 参数更多 ]torch.distributions.dirichlet.Dirichlet ### [torch.distributions.dirichlet.Dirichlet](https://pytorch.org/docs/stable/distributions.html#torch.distributions.dirichlet.Dirichlet) - ```python torch.distributions.dirichlet.Dirichlet(concentration, validate_args=None) ``` ### [paddle.distribution.Dirichlet](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Dirichlet_cn.html) - ```python paddle.distribution.Dirichlet(concentration) ``` @@ -15,7 +12,6 @@ paddle.distribution.Dirichlet(concentration) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------- | --------------------------------------------- | | concentration | concentration | 浓度参数,即公式中 α 参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.distribution.Distribution.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.distribution.Distribution.md index 6ff88207df1..5f351a44946 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.distribution.Distribution.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.distribution.Distribution.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.distribution.Distribution - +## [ torch 参数更多 ]torch.distributions.distribution.Distribution ### [torch.distributions.distribution.Distribution](https://pytorch.org/docs/stable/distributions.html#torch.distributions.distribution.Distribution) - ```python torch.distributions.distribution.Distribution(batch_shape=torch.Size([]), event_shape=torch.Size([]), validate_args=None) ``` ### [paddle.distribution.Distribution](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Distribution_cn.html) - ```python paddle.distribution.Distribution(batch_shape, event_shape) ``` @@ -15,7 +12,6 @@ paddle.distribution.Distribution(batch_shape, event_shape) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | --------------------------------------------- | | batch_shape | batch_shape | 概率分布参数批量形状。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.exp_family.ExponentialFamily.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.exp_family.ExponentialFamily.md index 54c2233327b..050f685a61f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.exp_family.ExponentialFamily.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.exp_family.ExponentialFamily.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.exp_family.ExponentialFamily - +## [ torch 参数更多 ]torch.distributions.exp_family.ExponentialFamily ### [torch.distributions.exp_family.ExponentialFamily](https://pytorch.org/docs/stable/distributions.html#torch.distributions.exp_family.ExponentialFamily) - ```python torch.distributions.exp_family.ExponentialFamily(batch_shape=torch.Size([]), event_shape=torch.Size([]), validate_args=None) ``` ### [paddle.distribution.ExponentialFamily](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/ExponentialFamily_cn.html) - ```python paddle.distribution.ExponentialFamily(batch_shape, event_shape) ``` @@ -15,7 +12,6 @@ paddle.distribution.ExponentialFamily(batch_shape, event_shape) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------- | --------------------------------------------- | | batch_shape | batch_shape | 概率分布参数批量形状。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.exponential.Exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.exponential.Exponential.md index 2bb7f37a1e7..544b3a1775b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.exponential.Exponential.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.exponential.Exponential.md @@ -1,14 +1,11 @@ -## [ torch 参数更多 ] torch.distributions.exponential.Exponential - +## [ torch 参数更多 ]torch.distributions.exponential.Exponential ### [torch.distributions.exponential.Exponential](https://pytorch.org/docs/stable/distributions.html#torch.distributions.exponential.Exponential.arg_constraints) - ```python torch.distributions.exponential.Exponential(rate, validate_args=None) ``` ### [paddle.distribution.Exponential](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/distribution/ExponentialFamily_cn.html#exponential) - ```python paddle.distribution.Exponential(rate) ``` @@ -16,7 +13,6 @@ paddle.distribution.Exponential(rate) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------ | ------------------------------------------------------------ | | rate | rate | 分布的速率参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.gamma.Gamma.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.gamma.Gamma.md index 7f9c8175220..12e584dd838 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.gamma.Gamma.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.gamma.Gamma.md @@ -1,13 +1,10 @@ -## [torch 参数更多 ]torch.distributions.gamma.Gamma - +## [ torch 参数更多 ]torch.distributions.gamma.Gamma ### [torch.distributions.gamma.Gamma](https://pytorch.org/docs/stable/distributions.html#gamma) - ```python torch.distributions.gamma.Gamma(concentration, rate, validate_args=None) ``` ### [paddle.distribution.Gamma](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Gamma_cn.html) - ```python paddle.distribution.Gamma(concentration, rate) ``` @@ -15,7 +12,6 @@ paddle.distribution.Gamma(concentration, rate) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------- | | concentration | concentration | 表示输入的参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.geometric.Geometric.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.geometric.Geometric.md index 4af44e87dde..2aaa98a0d5f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.geometric.Geometric.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.geometric.Geometric.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.geometric.Geometric - +## [ torch 参数更多 ]torch.distributions.geometric.Geometric ### [torch.distributions.geometric.Geometric](https://pytorch.org/docs/stable/distributions.html#torch.distributions.geometric.Geometric) - ```python torch.distributions.geometric.Geometric(probs=None, logits=None, validate_args=None) ``` ### [paddle.distribution.Geometric](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Geometric_cn.html#geometric) - ```python paddle.distribution.Geometric(probs) ``` @@ -15,7 +12,6 @@ paddle.distribution.Geometric(probs) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------- | | probs | probs | 几何分布成功概率参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.gumbel.Gumbel.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.gumbel.Gumbel.md index f28c4fcf15b..7f942a02580 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.gumbel.Gumbel.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.gumbel.Gumbel.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.gumbel.Gumbel - +## [ torch 参数更多 ]torch.distributions.gumbel.Gumbel ### [torch.distributions.gumbel.Gumbel](https://pytorch.org/docs/stable/distributions.html#torch.distributions.gumbel.Gumbel) - ```python torch.distributions.gumbel.Gumbel(loc, scale, validate_args=None) ``` ### [paddle.distribution.Gumbel](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Gumbel_cn.html#gumbel) - ```python paddle.distribution.Gumbel(loc, scale) ``` @@ -15,7 +12,6 @@ paddle.distribution.Gumbel(loc, scale) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------- | | loc | loc | 耿贝尔分布位置参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.independent.Independent.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.independent.Independent.md index 19bca1212ac..bfa3444bcf4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.independent.Independent.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.independent.Independent.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.independent.Independent - +## [ torch 参数更多 ]torch.distributions.independent.Independent ### [torch.distributions.independent.Independent](https://pytorch.org/docs/stable/distributions.html#torch.distributions.independent.Independent) - ```python torch.distributions.independent.Independent(base_distribution, reinterpreted_batch_ndims, validate_args=None) ``` ### [paddle.distribution.Independent](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Independent_cn.html) - ```python paddle.distribution.Independent(base, reinterpreted_batch_rank) ``` @@ -15,7 +12,6 @@ paddle.distribution.Independent(base, reinterpreted_batch_rank) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------------- | ------------------------ | ------------------------------------------------ | | base_distribution | base | 基础分布,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.laplace.Laplace.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.laplace.Laplace.md index 8ac93dfb90c..22c14398995 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.laplace.Laplace.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.laplace.Laplace.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.laplace.Laplace - +## [ torch 参数更多 ]torch.distributions.laplace.Laplace ### [torch.distributions.laplace.Laplace](https://pytorch.org/docs/stable/distributions.html#torch.distributions.laplace.Laplace) - ```python torch.distributions.laplace.Laplace(loc, scale, validate_args=None) ``` ### [paddle.distribution.Laplace](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Laplace_cn.html#laplace) - ```python paddle.distribution.Laplace(loc, scale) ``` @@ -15,7 +12,6 @@ paddle.distribution.Laplace(loc, scale) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------- | | loc | loc | 拉普拉斯分布位置参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.lkj_cholesky.LKJCholesky.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.lkj_cholesky.LKJCholesky.md index 01411ab1491..210ba6ddad2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.lkj_cholesky.LKJCholesky.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.lkj_cholesky.LKJCholesky.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributions.lkj_cholesky.LKJCholesky - ### [torch.distributions.lkj_cholesky.LKJCholesky](https://pytorch.org/docs/stable/distributions.html#torch.distributions.lkj_cholesky.LKJCholesky) - ```python torch.distributions.lkj_cholesky.LKJCholesky(dim, concentration=1.0, validate_args=None) ``` ### [paddle.distribution.LKJCholesky](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distribution/LKJCholesky_cn.html) - ```python paddle.distribution.LKJCholesky(dim, concentration=1.0, sample_method='onion') ``` @@ -16,7 +13,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------- | ----------------------------------------------------------------------- | | dim | dim | 表示输入的参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.log_normal.LogNormal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.log_normal.LogNormal.md index 799bc63f94f..94c8c2c8f1e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.log_normal.LogNormal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.log_normal.LogNormal.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.log_normal.LogNormal - +## [ torch 参数更多 ]torch.distributions.log_normal.LogNormal ### [torch.distributions.log_normal.LogNormal](https://pytorch.org/docs/stable/distributions.html#torch.distributions.log_normal.LogNormal) - ```python torch.distributions.log_normal.LogNormal(loc, scale, validate_args=None) ``` ### [paddle.distribution.LogNormal](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/LogNormal_cn.html#lognormal) - ```python paddle.distribution.LogNormal(loc, scale, name=None) ``` @@ -15,7 +12,6 @@ paddle.distribution.LogNormal(loc, scale, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------- | | loc | loc | 正态分布平均值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.multinomial.Multinomial.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.multinomial.Multinomial.md index d8b2bb88768..1d38964cf66 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.multinomial.Multinomial.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.multinomial.Multinomial.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.multinomial.Multinomial - +## [ torch 参数更多 ]torch.distributions.multinomial.Multinomial ### [torch.distributions.multinomial.Multinomial](https://pytorch.org/docs/stable/distributions.html#torch.distributions.multinomial.Multinomial) - ```python torch.distributions.multinomial.Multinomial(total_count=1, probs=None, logits=None, validate_args=None) ``` ### [paddle.distribution.Multinomial](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Multinomial_cn.html) - ```python paddle.distribution.Multinomial(total_count, probs) ``` @@ -15,7 +12,6 @@ paddle.distribution.Multinomial(total_count, probs) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ---------------------------------------------- | | total_count | total_count | 实验次数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.multivariate_normal.MultivariateNormal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.multivariate_normal.MultivariateNormal.md index eab057732b8..4f4b7c69695 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.multivariate_normal.MultivariateNormal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.multivariate_normal.MultivariateNormal.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.distributions.multivariate_normal.MultivariateNormal - +## [ torch 参数更多 ]torch.distributions.multivariate_normal.MultivariateNormal ### [torch.distributions.multivariate_normal.MultivariateNormal](https://pytorch.org/docs/stable/distributions.html#multivariatenormal) - ```python torch.distributions.multivariate_normal.MultivariateNormal(loc, covariance_matrix=None, @@ -11,7 +9,6 @@ torch.distributions.multivariate_normal.MultivariateNormal(loc, ``` ### [paddle.distribution.MultivariateNormal](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/distribution/MultivariateNormal_cn.html#multivariatenormal) - ```python paddle.distribution.MultivariateNormal(loc, covariance_matrix=None, @@ -22,7 +19,6 @@ paddle.distribution.MultivariateNormal(loc, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------ | ------------------------------------------------------------ | | loc | loc | MultivariateNormal 的均值向量。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.normal.Normal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.normal.Normal.md index b2e5afcf188..3287650e84f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.normal.Normal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.normal.Normal.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.normal.Normal - +## [ torch 参数更多 ]torch.distributions.normal.Normal ### [torch.distributions.normal.Normal](https://pytorch.org/docs/stable/distributions.html#torch.distributions.normal.Normal) - ```python torch.distributions.normal.Normal(loc, scale, validate_args=None) ``` ### [paddle.distribution.Normal](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Normal_cn.html) - ```python paddle.distribution.Normal(loc, scale, name=None) ``` @@ -15,7 +12,6 @@ paddle.distribution.Normal(loc, scale, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | --------------------------------------------- | | loc | loc | 正态分布平均值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.poisson.Poisson.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.poisson.Poisson.md index ac0954a0c23..86fd28a95c1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.poisson.Poisson.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.poisson.Poisson.md @@ -1,13 +1,10 @@ -## [torch 参数更多 ]torch.distributions.poisson.Poisson - +## [ torch 参数更多 ]torch.distributions.poisson.Poisson ### [torch.distributions.poisson.Poisson](https://pytorch.org/docs/stable/distributions.html#poisson) - ```python torch.distributions.poisson.Poisson(rate, validate_args=None) ``` ### [paddle.distribution.Poisson](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distribution/Poisson_cn.html) - ```python paddle.distribution.Poisson(rate) ``` @@ -15,7 +12,6 @@ paddle.distribution.Poisson(rate) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------- | ----------------------------------------------------------------------- | | rate | rate | 表示输入的参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.studentT.StudentT.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.studentT.StudentT.md index 857bbd880b5..2a844552ec5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.studentT.StudentT.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.studentT.StudentT.md @@ -1,13 +1,10 @@ -## [torch 参数更多 ]torch.distributions.studentT.StudentT - +## [ torch 参数更多 ]torch.distributions.studentT.StudentT ### [torch.distributions.studentT.StudentT](https://pytorch.org/docs/stable/distributions.html#studentt) - ```python torch.distributions.studentT.StudentT(df, loc=0.0, scale=1.0, validate_args=None) ``` ### [paddle.distribution.StudentT](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distribution/StudentT_cn.html) - ```python paddle.distribution.StudentT(df, loc, scale, name=None) ``` @@ -16,7 +13,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------------------------------- | | df | df | 自由度,是一个正数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transformed_distribution.TransformedDistribution.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transformed_distribution.TransformedDistribution.md index 3d5396a7db3..2ba9fcac74a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transformed_distribution.TransformedDistribution.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transformed_distribution.TransformedDistribution.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.transformed_distribution.TransformedDistribution - +## [ torch 参数更多 ]torch.distributions.transformed_distribution.TransformedDistribution ### [torch.distributions.transformed_distribution.TransformedDistribution](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transformed_distribution.TransformedDistribution) - ```python torch.distributions.transformed_distribution.TransformedDistribution(base_distribution, transforms, validate_args=None) ``` ### [paddle.distribution.TransformedDistribution](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/TransformedDistribution_cn.html#transformeddistribution) - ```python paddle.distribution.TransformedDistribution(base, transforms) ``` @@ -15,7 +12,6 @@ paddle.distribution.TransformedDistribution(base, transforms) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------- | ------------ | ----------------------------------------------------------------------- | | base_distribution | base | 基础分布,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.AbsTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.AbsTransform.md index 955e72308ec..375127e7af0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.AbsTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.AbsTransform.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributions.transforms.AbsTransform - ### [torch.distributions.transforms.AbsTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.AbsTransform) - ```python torch.distributions.transforms.AbsTransform(cache_size=0) ``` ### [paddle.distribution.AbsTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/AbsTransform_cn.html#paddle.distribution.AbsTransform) - ```python paddle.distribution.AbsTransform() ``` @@ -15,7 +12,6 @@ paddle.distribution.AbsTransform() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -- | | cache_size | - | 缓存大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.AffineTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.AffineTransform.md index eab714833fd..60c50d8940c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.AffineTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.AffineTransform.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributions.transforms.AffineTransform - ### [torch.distributions.transforms.AffineTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.AffineTransform) - ```python torch.distributions.transforms.AffineTransform(loc, scale, event_dim=0, cache_size=0) ``` ### [paddle.distribution.AffineTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/AffineTransform_cn.html#affinetransform) - ```python paddle.distribution.AffineTransform(loc, scale) ``` @@ -15,7 +12,6 @@ paddle.distribution.AffineTransform(loc, scale) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -- | | loc | loc | 偏置参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ComposeTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ComposeTransform.md index 39ee6671344..8b1f7d581e8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ComposeTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ComposeTransform.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.transforms.ComposeTransform - +## [ torch 参数更多 ]torch.distributions.transforms.ComposeTransform ### [torch.distributions.transforms.ComposeTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.ComposeTransform) - ```python torch.distributions.transforms.ComposeTransform(parts, cache_size=0) ``` ### [paddle.distribution.ChainTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/ChainTransform_cn.html) - ```python paddle.distribution.ChainTransform(transforms) ``` @@ -15,7 +12,6 @@ paddle.distribution.ChainTransform(transforms) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -------------------------------------------------------------------------- | | parts | transforms | 输入的变换序列,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ExpTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ExpTransform.md index da1dfed5aca..7f4d21d063b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ExpTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ExpTransform.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributions.transforms.ExpTransform - ### [torch.distributions.transforms.ExpTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.ExpTransform) - ```python torch.distributions.transforms.ExpTransform(cache_size=0) ``` ### [paddle.distribution.ExpTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/ExpTransform_cn.html#exptransform) - ```python paddle.distribution.ExpTransform() ``` @@ -15,7 +12,6 @@ paddle.distribution.ExpTransform() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -- | | cache_size | - | 缓存大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.IndependentTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.IndependentTransform.md index 02b07625de7..4baba92549c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.IndependentTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.IndependentTransform.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributions.transforms.IndependentTransform - ### [torch.distributions.transforms.IndependentTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.IndependentTransform) - ```python torch.distributions.transforms.IndependentTransform(base_transform, reinterpreted_batch_ndims, cache_size=0) ``` ### [paddle.distribution.IndependentTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/IndependentTransform_cn.html#independenttransform) - ```python paddle.distribution.IndependentTransform(base, reinterpreted_batch_rank) ``` @@ -15,7 +12,6 @@ paddle.distribution.IndependentTransform(base, reinterpreted_batch_rank) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------------- | ------------------------ | ------------------------ | | base_transform | base | 基础变换,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.PowerTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.PowerTransform.md index 00e3ffc8553..e0cf0b8b11e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.PowerTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.PowerTransform.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributions.transforms.PowerTransform - ### [torch.distributions.transforms.PowerTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.SigmoidTransform) - ```python torch.distributions.transforms.PowerTransform(exponent, cache_size=0) ``` ### [paddle.distribution.PowerTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/PowerTransform_cn.html#powertransform) - ```python paddle.distribution.PowerTransform(power) ``` @@ -15,7 +12,6 @@ paddle.distribution.PowerTransform(power) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -- | | exponent | power | 幂参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ReshapeTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ReshapeTransform.md index ed33da17aa0..c9377cd1254 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ReshapeTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.ReshapeTransform.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.transforms.ReshapeTransform - +## [ torch 参数更多 ]torch.distributions.transforms.ReshapeTransform ### [torch.distributions.transforms.ReshapeTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.ReshapeTransform) - ```python torch.distributions.transforms.ReshapeTransform(in_shape, out_shape, cache_size=0) ``` ### [paddle.distribution.ReshapeTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/ReshapeTransform_cn.html) - ```python paddle.distribution.ReshapeTransform(in_event_shape, out_event_shape) ``` @@ -15,7 +12,6 @@ paddle.distribution.ReshapeTransform(in_event_shape, out_event_shape) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | --------------- | ------------------------------------------- | | in_shape | in_event_shape | Reshape 前的事件形状,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.SigmoidTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.SigmoidTransform.md index dec61fc2cf5..6d26970f116 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.SigmoidTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.SigmoidTransform.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributions.transforms.SigmoidTransform - ### [torch.distributions.transforms.SigmoidTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.SigmoidTransform) - ```python torch.distributions.transforms.SigmoidTransform(cache_size=0) ``` ### [paddle.distribution.SigmoidTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/SigmoidTransform_cn.html#sigmoidtransform) - ```python paddle.distribution.SigmoidTransform() ``` @@ -15,7 +12,6 @@ paddle.distribution.SigmoidTransform() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -- | | cache_size | - | 缓存大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.SoftmaxTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.SoftmaxTransform.md index 95ef8b2e234..7fb39895ea7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.SoftmaxTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.SoftmaxTransform.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.transforms.SoftmaxTransform - +## [ torch 参数更多 ]torch.distributions.transforms.SoftmaxTransform ### [torch.distributions.transforms.SoftmaxTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.SoftmaxTransform) - ```python torch.distributions.transforms.SoftmaxTransform(cache_size=0) ``` ### [paddle.distribution.SoftmaxTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/SoftmaxTransform_cn.html) - ```python paddle.distribution.SoftmaxTransform() ``` @@ -15,7 +12,6 @@ paddle.distribution.SoftmaxTransform() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -------------------------------------------------------------------------- | | cache_size | - | 表示 cache 大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.StackTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.StackTransform.md index dca6de9ded7..dca9678c737 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.StackTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.StackTransform.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.transforms.StackTransform - +## [ torch 参数更多 ]torch.distributions.transforms.StackTransform ### [torch.distributions.transforms.StackTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.StackTransform) - ```python torch.distributions.transforms.StackTransform(tseq, dim=0, cache_size=0) ``` ### [paddle.distribution.StackTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/StackTransform_cn.html) - ```python paddle.distribution.StackTransform(transforms, axis=0) ``` @@ -15,7 +12,6 @@ paddle.distribution.StackTransform(transforms, axis=0) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -------------------------------------------------------------------------- | | tseq | transforms | 输入的变换序列,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.StickBreakingTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.StickBreakingTransform.md index 96bfd231320..37e6d913b2a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.StickBreakingTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.StickBreakingTransform.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.transforms.StickBreakingTransform - +## [ torch 参数更多 ]torch.distributions.transforms.StickBreakingTransform ### [torch.distributions.transforms.StickBreakingTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.StickBreakingTransform) - ```python torch.distributions.transforms.StickBreakingTransform(cache_size=0) ``` ### [paddle.distribution.StickBreakingTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/StickBreakingTransform_cn.html) - ```python paddle.distribution.StickBreakingTransform() ``` @@ -15,7 +12,6 @@ paddle.distribution.StickBreakingTransform() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -------------------------------------------------------------------------- | | cache_size | - | 表示 cache 大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.TanhTransform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.TanhTransform.md index 476bdf948e9..230cc6a42ca 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.TanhTransform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.TanhTransform.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.distributions.transforms.TanhTransform - ### [torch.distributions.transforms.TanhTransform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.TanhTransform) - ```python torch.distributions.transforms.TanhTransform(cache_size=0) ``` ### [paddle.distribution.TanhTransform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/TanhTransform_cn.html#tanhtransform) - ```python paddle.distribution.TanhTransform() ``` @@ -15,7 +12,6 @@ paddle.distribution.TanhTransform() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -- | | cache_size | - | 缓存大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.Transform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.Transform.md index 97c411a27bc..0753777f730 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.Transform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.transforms.Transform.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.transforms.Transform - +## [ torch 参数更多 ]torch.distributions.transforms.Transform ### [torch.distributions.transforms.Transform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.transforms.Transform) - ```python torch.distributions.transforms.Transform(cache_size=0) ``` ### [paddle.distribution.Transform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Transform_cn.html#transform) - ```python paddle.distribution.Transform() ``` @@ -15,7 +12,6 @@ paddle.distribution.Transform() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -------------------------------------------------------------------------- | | cache_size | - | 表示 cache 大小,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.uniform.Uniform.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.uniform.Uniform.md index f37e1b6eb7c..fe99f4eacb5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.uniform.Uniform.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.distributions.uniform.Uniform.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.distributions.uniform.Uniform - +## [ torch 参数更多 ]torch.distributions.uniform.Uniform ### [torch.distributions.uniform.Uniform](https://pytorch.org/docs/stable/distributions.html#torch.distributions.uniform.Uniform) - ```python torch.distributions.uniform.Uniform(low, high, validate_args=None) ``` ### [paddle.distribution.Uniform](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distribution/Uniform_cn.html) - ```python paddle.distribution.Uniform(low, high, name=None) ``` @@ -15,7 +12,6 @@ paddle.distribution.Uniform(low, high, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | --------------------------------------------- | | low | low | 均匀分布的下边界。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.exp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.exp.md index bf03c952356..a076a59c0d4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.exp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.exp.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.exp ### [torch.exp](https://pytorch.org/docs/stable/generated/torch.exp.html?highlight=torch+exp#torch.exp) - ```python torch.exp(input, *, @@ -8,7 +7,6 @@ torch.exp(input, ``` ### [paddle.exp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/exp_cn.html#exp) - ```python paddle.exp(x, name=None) @@ -16,7 +14,6 @@ paddle.exp(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fft.md index 87a74599d44..e0e2db67497 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fft.md @@ -1,20 +1,16 @@ -## [ torch 参数更多 ] torch.fft.fft - +## [ torch 参数更多 ]torch.fft.fft ### [torch.fft.fft](https://pytorch.org/docs/stable/generated/torch.fft.fft.html?highlight=fft#torch.fft.fft) - ```python torch.fft.fft(input, n=None, dim=- 1, norm='backward', *, out=None) ``` ### [paddle.fft.fft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/fft_cn.html) - ```python paddle.fft.fft(x, n=None, axis=- 1, norm='backward', name=None) ``` 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fft2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fft2.md index fff366ede03..50d66f9053e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fft2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fft2.md @@ -1,20 +1,16 @@ -## [ torch 参数更多 ] torch.fft.fft2 - +## [ torch 参数更多 ]torch.fft.fft2 ### [torch.fft.fft2](https://pytorch.org/docs/stable/generated/torch.fft.fft2.html?highlight=fft2#torch.fft.fft2) - ```python torch.fft.fft2(input, s=None, dim=None, norm='backward', *, out=None) ``` ### [paddle.fft.fft2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/fft2_cn.html) - ```python paddle.fft.fft2(x, s=None, axes=None, norm='backward', name=None) ``` 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fftfreq.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fftfreq.md index 094a2ba0f56..7aecd6c234c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fftfreq.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fftfreq.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.fft.fftfreq - +## [ torch 参数更多 ]torch.fft.fftfreq ### [torch.fft.fftfreq](https://pytorch.org/docs/stable/generated/torch.fft.fftfreq.html?highlight=fftfreq#torch.fft.fftfreq) - ```python torch.fft.fftfreq(n, d=1.0, @@ -14,7 +12,6 @@ torch.fft.fftfreq(n, ``` ### [paddle.fft.fftfreq](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/fftfreq_cn.html) - ```python paddle.fft.fftfreq(n, d=1.0, @@ -24,7 +21,6 @@ paddle.fft.fftfreq(n, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | n | n | 窗长度(傅里叶变换点数)。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fftn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fftn.md index f9c9fc60661..1909c2bb9a7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fftn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.fftn.md @@ -1,20 +1,16 @@ -## [ torch 参数更多 ] torch.fft.fftn - +## [ torch 参数更多 ]torch.fft.fftn ### [torch.fft.fftn](https://pytorch.org/docs/stable/generated/torch.fft.fftn.html?highlight=fftn#torch.fft.fftn) - ```python torch.fft.fftn(input, s=None, dim=None, norm='backward', *, out=None) ``` ### [paddle.fft.fftn](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/fftn_cn.html) - ```python paddle.fft.fftn(x, s=None, axes=None, norm='backward', name=None) ``` 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfft.md index 63482bac481..ba1b66fe39c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfft.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.fft.hfft - +## [ torch 参数更多 ]torch.fft.hfft ### [torch.fft.hfft](https://pytorch.org/docs/stable/generated/torch.fft.hfft.html?highlight=hfft#torch.fft.hfft) - ```python torch.fft.hfft(input, n=None, @@ -12,7 +10,6 @@ torch.fft.hfft(input, ``` ### [paddle.fft.hfft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/hfft_cn.html) - ```python paddle.fft.hfft(x, n=None, @@ -23,7 +20,6 @@ paddle.fft.hfft(x, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfft2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfft2.md index d06bbce1f59..ff9a96123ce 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfft2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfft2.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.hfft2 - ### [torch.fft.hfft2](https://pytorch.org/docs/stable/generated/torch.fft.hfft2.html?highlight=torch+fft+hfft2#torch.fft.hfft2) - ```python torch.fft.hfft2(input, s=None, dim=(- 2, - 1), norm='backward', *, out=None) ``` ### [paddle.fft.hfft2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/hfft2_cn.html) - ```python paddle.fft.hfft2(x, s=None, axes=(- 2, - 1), norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.hfft2(x, s=None, axes=(- 2, - 1), norm='backward', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfftn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfftn.md index f20afd4670c..a5fbd231850 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfftn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.hfftn.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.hfftn - ### [torch.fft.hfftn](https://pytorch.org/docs/stable/generated/torch.fft.hfftn.html?highlight=torch+fft+hfftn#torch.fft.hfftn) - ```python torch.fft.hfftn(input, s=None, dim=None, norm='backward', *, out=None) ``` ### [paddle.fft.hfftn](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/hfftn_cn.html) - ```python paddle.fft.hfftn(x, s=None, axes=None, norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.hfftn(x, s=None, axes=None, norm='backward', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifft.md index 7e6d6d1b94d..aa0dceb17df 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifft.md @@ -1,20 +1,16 @@ -## [ torch 参数更多 ] torch.fft.ifft - +## [ torch 参数更多 ]torch.fft.ifft ### [torch.fft.ifft](https://pytorch.org/docs/stable/generated/torch.fft.ifft.html?highlight=ifft#torch.fft.ifft) - ```python torch.fft.ifft(input, n=None, dim=- 1, norm='backward', *, out=None) ``` ### [paddle.fft.ifft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/ifft_cn.html) - ```python paddle.fft.ifft(x, n=None, axis=- 1, norm='backward', name=None) ``` 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x |输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifft2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifft2.md index 37d800e29ad..76fa1fcd228 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifft2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifft2.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.fft.ifft2 - +## [ torch 参数更多 ]torch.fft.ifft2 ### [torch.fft.ifft2](https://pytorch.org/docs/stable/generated/torch.fft.ifft2.html?highlight=ifft2#torch.fft.ifft2) - ```python torch.fft.ifft2(input, s=None, @@ -12,7 +10,6 @@ torch.fft.ifft2(input, ``` ### [paddle.fft.ifft2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/ifft2_cn.html) - ```python paddle.fft.ifft2(x, s=None, @@ -23,7 +20,6 @@ paddle.fft.ifft2(x, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x |输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifftn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifftn.md index 31f5564dd86..15f606d83c1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifftn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ifftn.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.fft.ifftn - +## [ torch 参数更多 ]torch.fft.ifftn ### [torch.fft.ifftn](https://pytorch.org/docs/stable/generated/torch.fft.ifftn.html?highlight=ifftn#torch.fft.ifftn) - ```python torch.fft.ifftn(input, s=None, @@ -12,7 +10,6 @@ torch.fft.ifftn(input, ``` ### [paddle.fft.ifftn](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/ifftn_cn.html) - ```python paddle.fft.ifftn(x, s=None, @@ -23,7 +20,6 @@ paddle.fft.ifftn(x, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x |输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfft.md index 8c04291c397..4beabaf624a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfft.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.fft.ihfft - +## [ torch 参数更多 ]torch.fft.ihfft ### [torch.fft.ihfft](https://pytorch.org/docs/stable/generated/torch.fft.ihfft.html?highlight=ihfft#torch.fft.ihfft) - ```python torch.fft.ihfft(input, n=None, @@ -12,7 +10,6 @@ torch.fft.ihfft(input, ``` ### [paddle.fft.ihfft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/ihfft_cn.html) - ```python paddle.fft.ihfft(x, n=None, @@ -23,7 +20,6 @@ paddle.fft.ihfft(x, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x |输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfft2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfft2.md index 543b74264ee..4543534278a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfft2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfft2.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.ihfft2 - ### [torch.fft.ihfft2](https://pytorch.org/docs/stable/generated/torch.fft.ihfft2.html?highlight=torch+fft+ihfft2#torch.fft.ihfft2) - ```python torch.fft.ihfft2(input, s=None, dim=(- 2, - 1), norm='backward', *, out=None) ``` ### [paddle.fft.ihfft2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/ihfft2_cn.html) - ```python paddle.fft.ihfft2(x, s=None, axes=(- 2, - 1), norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.ihfft2(x, s=None, axes=(- 2, - 1), norm='backward', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfftn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfftn.md index c61085766c0..87e69d46764 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfftn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.ihfftn.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.ihfftn - ### [torch.fft.ihfftn](https://pytorch.org/docs/stable/generated/torch.fft.ihfftn.html?highlight=torch+fft+ihfftn#torch.fft.ihfftn) - ```python torch.fft.ihfftn(input, s=None, dim=None, norm='backward', *, out=None) ``` ### [paddle.fft.ihfftn](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/ihfftn_cn.html) - ```python paddle.fft.ihfftn(x, s=None, axes=None, norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.ihfftn(x, s=None, axes=None, norm='backward', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfft.md index 4e478c3dd98..ea04cc9afce 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfft.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.irfft - ### [torch.fft.irfft](https://pytorch.org/docs/stable/generated/torch.fft.irfft.html#torch-fft-irfft) - ```python torch.fft.irfft(input, n=None, dim=- 1, norm='backward', *, out=None) ``` ### [paddle.fft.irfft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/irfft_cn.html#irfft) - ```python paddle.fft.irfft(x, n=None, axis=- 1, norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.irfft(x, n=None, axis=- 1, norm='backward', name=None) 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ paddle.fft.irfft(x, n=None, axis=- 1, norm='backward', name=None) | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfft2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfft2.md index 168b5076d8b..c6e27ea0975 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfft2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfft2.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.irfft2 - ### [torch.fft.irfft2](https://pytorch.org/docs/stable/generated/torch.fft.irfft2.html#torch-fft-irfft2) - ```python torch.fft.irfft2(input, s=None, dim=(- 2, - 1), norm='backward', *, out=None) ``` ### [paddle.fft.irfft2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/irfft2_cn.html#irfft2) - ```python paddle.fft.irfft2(x, s=None, axes=(- 2, - 1), norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.irfft2(x, s=None, axes=(- 2, - 1), norm='backward', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfftn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfftn.md index 3871946d179..6ed6e71a224 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfftn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.irfftn.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.fft.irfftn - +## [ torch 参数更多 ]torch.fft.irfftn ### [torch.fft.irfftn](https://pytorch.org/docs/stable/generated/torch.fft.irfftn.html?highlight=irfftn#torch.fft.irfftn) - ```python torch.fft.irfftn(input, s=None, @@ -12,7 +10,6 @@ torch.fft.irfftn(input, ``` ### [paddle.fft.irfftn](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/irfftn_cn.html) - ```python paddle.fft.irfftn(x, s=None, @@ -23,7 +20,6 @@ paddle.fft.irfftn(x, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x |输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfft.md index a2d5deeddfd..112827aa841 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfft.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.rfft - ### [torch.fft.rfft](https://pytorch.org/docs/stable/generated/torch.fft.rfft.html#torch-fft-rfft) - ```python torch.fft.rfft(input, n=None, dim=(- 2, - 1), norm='backward', *, out=None) ``` ### [paddle.fft.rfft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/rfft_cn.html#rfft) - ```python paddle.fft.rfft(x, n=None, axis=(- 2, - 1), norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.rfft(x, n=None, axis=(- 2, - 1), norm='backward', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfft2.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfft2.md index d8243482393..0132181cf3d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfft2.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfft2.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.rfft2 - ### [torch.fft.rfft2](https://pytorch.org/docs/stable/generated/torch.fft.rfft2.html) - ```python torch.fft.rfft2(input, s=None, dim=(-2, -1), norm=None, *, out=None) ``` ### [paddle.fft.rfft2](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/rfft2_cn.html#rfft2) - ```python paddle.fft.rfft2(x, s=None, axes=(- 2, - 1), norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.rfft2(x, s=None, axes=(- 2, - 1), norm='backward', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfftfreq.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfftfreq.md index 7a5b8c7cff1..d6f4ec6b93a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfftfreq.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfftfreq.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.fft.rfftfreq - +## [ torch 参数更多 ]torch.fft.rfftfreq ### [torch.fft.rfftfreq](https://pytorch.org/docs/stable/generated/torch.fft.rfftfreq.html?highlight=rfftfreq#torch.fft.rfftfreq) - ```python torch.fft.rfftfreq(n, d=1.0, @@ -14,7 +12,6 @@ torch.fft.rfftfreq(n, ``` ### [paddle.fft.rfftfreq](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/rfftfreq_cn.html) - ```python paddle.fft.rfftfreq(n, d=1.0, @@ -24,7 +21,6 @@ paddle.fft.rfftfreq(n, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | n |n | 窗长度(傅里叶变换点数)。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfftn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfftn.md index 88bf023eee1..cbd75086de0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfftn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fft.rfftn.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.fft.rfftn - ### [torch.fft.rfftn](https://pytorch.org/docs/stable/generated/torch.fft.rfftn.html#torch-fft-rfftn) - ```python torch.fft.rfftn(input, s=None, dim=None, norm='backward', *, out=None) ``` ### [paddle.fft.rfftn](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fft/rfftn_cn.html#rfftn) - ```python paddle.fft.rfftn(x, s=None, axes=None, norm='backward', name=None) ``` @@ -15,7 +12,6 @@ paddle.fft.rfftn(x, s=None, axes=None, norm='backward', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | norm | norm | 表示傅里叶变换的缩放模式。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fix.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fix.md index fab95417560..f1b3ba345f6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fix.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fix.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.fix ### [torch.fix](https://pytorch.org/docs/stable/generated/torch.fix.html?highlight=torch+fix#torch.fix) - ```python torch.fix(input, *, @@ -8,7 +7,6 @@ torch.fix(input, ``` ### [paddle.trunc](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/trunc_cn.html) - ```python paddle.trunc(input, name=None) @@ -16,7 +14,6 @@ paddle.trunc(input, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input | 表示输入的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmax.md index 2e080159e43..703b42f87cd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmax.md @@ -1,20 +1,16 @@ -## [torch 参数更多 ]torch.fmax - +## [ torch 参数更多 ]torch.fmax ### [torch.fmax](https://pytorch.org/docs/stable/generated/torch.fmax.html#torch.fmax) - ```python torch.fmax(input, other, *, out=None) ``` ### [paddle.fmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fmax_cn.html) - ```python paddle.fmax(x, y, name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmin.md index 9cc6820ee98..d2bc845cd13 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmin.md @@ -1,20 +1,16 @@ -## [torch 参数更多 ]torch.fmin - +## [ torch 参数更多 ]torch.fmin ### [torch.fmin](https://pytorch.org/docs/stable/generated/torch.fmin.html#torch.fmin) - ```python torch.fmin(input, other, *, out=None) ``` ### [paddle.fmin](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/fmin_cn.html) - ```python paddle.fmin(x, y, name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmod.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmod.md index 48d4e207d60..35fe324bf58 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmod.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.fmod.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.fmod +## [ torch 参数更多 ]torch.fmod ### [torch.fmod](https://pytorch.org/docs/stable/generated/torch.fmod.html?highlight=fmod#torch.fmod) - ```python torch.fmod(input, other, @@ -9,7 +8,6 @@ torch.fmod(input, ``` ### [paddle.mod](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/mod_cn.html#mod) - ```python paddle.mod(x, y, @@ -18,7 +16,6 @@ paddle.mod(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的被除数 ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.frac.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.frac.md index 71551e5e46c..19a26744798 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.frac.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.frac.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.frac +## [ torch 参数更多 ]torch.frac ### [torch.frac](https://pytorch.org/docs/stable/generated/torch.frac.html?highlight=frac#torch.frac) - ```python torch.frac(input, *, @@ -8,7 +7,6 @@ torch.frac(input, ``` ### [paddle.frac](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/frac_cn.html#frac) - ```python paddle.frac(x, name=None) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.frexp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.frexp.md index 7c6943fc5e5..f0dd8fdc746 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.frexp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.frexp.md @@ -1,14 +1,11 @@ ## [ torch 参数更多 ]torch.frexp - ### [torch.frexp](https://pytorch.org/docs/stable/generated/torch.frexp.html?highlight=frexp#torch.frexp) - ```python torch.frexp(input, out=None) ``` ### [paddle.frexp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/frexp_cn.html#frexp) - ```python paddle.frexp(x, name=None) @@ -16,16 +13,13 @@ paddle.frexp(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor,可选项,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.frexp(x,out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.gcd.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.gcd.md index 27c3759160e..9cfd3aed6d9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.gcd.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.gcd.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.gcd - +## [ torch 参数更多 ]torch.gcd ### [torch.gcd](https://pytorch.org/docs/stable/generated/torch.gcd.html#torch-gcd) - ```python torch.gcd(input, other, *, out=None) ``` ### [paddle.gcd](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/gcd_cn.html#gcd) - ```python paddle.gcd(x, y, name=None) ``` @@ -15,7 +12,6 @@ paddle.gcd(x, y, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------- | | input | x | 表示输入的第一个 Tensor ,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.gcd(x,y, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hamming_window.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hamming_window.md index 29fada58112..8d096ea5930 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hamming_window.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hamming_window.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.hamming_window ### [torch.hamming_window](https://pytorch.org/docs/stable/generated/torch.hamming_window.html) - ```python torch.hamming_window(window_length, periodic=True, alpha=0.54, beta=0.46, *, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `hamming`。 | @@ -27,7 +24,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hann_window.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hann_window.md index 878140d2930..6d9911b25c4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hann_window.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hann_window.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.hann_window ### [torch.hann_window](https://pytorch.org/docs/stable/generated/torch.hann_window.html) - ```python torch.hann_window(window_length, periodic=True, *, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `hann`。 | @@ -25,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.heaviside.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.heaviside.md index 733490e205c..4d01ce36606 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.heaviside.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.heaviside.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.heaviside ### [torch.heaviside](https://pytorch.org/docs/stable/generated/torch.heaviside.html#torch.heaviside) - ```python torch.heaviside(input, values, *, out=None) ``` ### [paddle.heaviside](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/heaviside_cn.html#heaviside) - ```python paddle.heaviside(x, y, name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.download_url_to_file.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.download_url_to_file.md index 9b35a3accd5..58e41b1d6bf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.download_url_to_file.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.download_url_to_file.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.hub.download_url_to_file - +## [ torch 参数更多 ]torch.hub.download_url_to_file ### [torch.hub.download_url_to_file](https://pytorch.org/docs/stable/hub.html?highlight=download#torch.hub.download_url_to_file) - ```python torch.hub.download_url_to_file(url, dst, @@ -10,7 +8,6 @@ torch.hub.download_url_to_file(url, ``` ### [paddle.utils.download.get_weights_path_from_url](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/utils/download/get_weights_path_from_url_cn.html) - ```python paddle.utils.download.get_weights_path_from_url(url, md5sum=None) @@ -19,7 +16,6 @@ paddle.utils.download.get_weights_path_from_url(url, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | |url |url |下载的链接。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.help.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.help.md index b8ec32c0378..a20d655b035 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.help.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.help.md @@ -1,7 +1,5 @@ -## [torch 参数更多] torch.hub.help - +## [ torch 参数更多 ]torch.hub.help ### [torch.hub.help](https://pytorch.org/docs/stable/hub.html?highlight=hub+help#torch.hub.help) - ```python torch.hub.help(github, model, @@ -11,7 +9,6 @@ torch.hub.help(github, ``` ### [paddle.hub.help](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hub/help_cn.html) - ```python paddle.hub.help(repo_dir, model, @@ -22,7 +19,6 @@ paddle.hub.help(repo_dir, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | github | repo_dir |repo 地址,支持 git 地址形式和 local 地址,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.list.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.list.md index 84941d9d5ba..580ee466551 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.list.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.list.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.hub.list - +## [ torch 参数更多 ]torch.hub.list ### [torch.hub.list](https://pytorch.org/docs/stable/hub.html?highlight=hub+list#torch.hub.list) - ```python torch.hub.list(github, force_reload=False, @@ -10,7 +8,6 @@ torch.hub.list(github, ``` ### [paddle.hub.list](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hub/list_cn.html) - ```python paddle.hub.list(repo_dir, source='github', @@ -21,7 +18,6 @@ paddle.hub.list(repo_dir, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | github | repo_dir |repo 地址,支持 git 地址形式和 local 地址,仅参数名不一致。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.load.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.load.md index 1bb749b0274..882f1d5c624 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.load.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.load.md @@ -1,7 +1,5 @@ -## [ torch 参数更多 ] torch.hub.load - +## [ torch 参数更多 ]torch.hub.load ### [torch.hub.load](https://pytorch.org/docs/stable/hub.html?highlight=hub+load#torch.hub.load) - ```python torch.hub.load(repo_or_dir, model, @@ -15,7 +13,6 @@ torch.hub.load(repo_or_dir, ``` ### [paddle.hub.load](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hub/load_cn.html) - ```python paddle.hub.load(repo_dir, model, @@ -26,7 +23,6 @@ paddle.hub.load(repo_dir, 其中,PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | repo_or_dir |repo_dir |repo 地址,支持 git 地址形式和 local 地址,仅参数名不同。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.load_state_dict_from_url.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.load_state_dict_from_url.md index 63d3fcfc714..f96267ad9b8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.load_state_dict_from_url.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hub.load_state_dict_from_url.md @@ -1,20 +1,16 @@ ## [ torch 参数更多 ]torch.hub.load_state_dict_from_url - ### [torch.hub.load_state_dict_from_url](https://pytorch.org/docs/stable/hub.html#torch.hub.load_state_dict_from_url) - ```python torch.hub.load_state_dict_from_url(url, model_dir=None, map_location=None, progress=True, check_hash=False, file_name=None, weights_only=False) ``` ### [paddle.hub.load_state_dict_from_url](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hub/load_state_dict_from_url_cn.html#load-state-dict-from-url) - ```python paddle.hub.load_state_dict_from_url(url, model_dir=None, check_hash=False, file_name=None, map_location=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | url | url | 要下载对象的 URL 地址。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hypot.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hypot.md index 952d7070c98..7c6660f15fe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hypot.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.hypot.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.hypot - ### [torch.hypot](https://pytorch.org/docs/stable/generated/torch.hypot.html#torch.hypot) - ```python torch.hypot(input, other, *, out=None) ``` ### [paddle.hypot](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/hypot_cn.html) - ```python paddle.hypot(x, y, name=None) ``` @@ -15,7 +12,6 @@ paddle.hypot(x, y, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.hypot(x, y, out=out) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.index_add.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.index_add.md index 6882dace103..8d23bb8cff3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.index_add.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.index_add.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.index_add ### [torch.index_add](https://pytorch.org/docs/stable/generated/torch.index_add.html#torch.index_add) - ```python torch.index_add(input, dim, index, source, *, alpha=1, out=None) ``` ### [paddle.index_add](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/index_add_cn.html#index-add) - ```python paddle.index_add(x, index, axis, value, name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.inner.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.inner.md index 30e307fc0fc..234cbd83dbf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.inner.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.inner.md @@ -1,13 +1,10 @@ -## [torch 参数更多 ]torch.inner - +## [ torch 参数更多 ]torch.inner ### [torch.inner](https://pytorch.org/docs/stable/generated/torch.inner.html?highlight=inner#torch.inner) - ```python torch.inner(input, other, *, out=None) ``` ### [paddle.inner](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/inner_cn.html) - ```python paddle.inner(x, y, name=None) ``` @@ -15,7 +12,6 @@ paddle.inner(x, y, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.inverse.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.inverse.md index 2d5bc7b5a17..4dbf26d1a43 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.inverse.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.inverse.md @@ -1,13 +1,10 @@ -## [torch 参数更多 ]torch.inverse - +## [ torch 参数更多 ]torch.inverse ### [torch.inverse](https://pytorch.org/docs/stable/generated/torch.inverse.html?highlight=inverse#torch.inverse) - ```python torch.inverse(input, *, out=None) ``` ### [paddle.linalg.inv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/inv_cn.html) - ```python paddle.linalg.inv(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.inv(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | @@ -23,7 +19,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.isneginf.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.isneginf.md index f7d301f9aa2..6382f3d2f38 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.isneginf.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.isneginf.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.isneginf - +## [ torch 参数更多 ]torch.isneginf ### [torch.isneginf](https://pytorch.org/docs/stable/generated/torch.isneginf.html#torch-isneginf) - ```python torch.isneginf(input, *, out=None) ``` ### [paddle.isneginf](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/isneginf_cn.html) - ```python paddle.isneginf(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.isneginf(x, name=None) Pytorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------ | ----------- | ------------------------------------------------ | | input | x | 输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # Pytorch 写法 torch.isneginf(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.isposinf.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.isposinf.md index 2ba94702296..36e10d19834 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.isposinf.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.isposinf.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.isposinf - +## [ torch 参数更多 ]torch.isposinf ### [torch.isposinf](https://pytorch.org/docs/stable/generated/torch.isposinf.html#torch-isposinf) - ```python torch.isposinf(input, *, out=None) ``` ### [paddle.isposinf](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/isposinf_cn.html) - ```python paddle.isposinf(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.isposinf(x, name=None) Pytorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------ | ----------- | ------------------------------------------------ | | input | x | 输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写实例 - #### out 参数:指定输出 - ```python # Pytorch 写法 torch.isposinf(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.ignore.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.ignore.md index 1f53418249f..bb8fb8c5419 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.ignore.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.ignore.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.jit.ignore - +## [ torch 参数更多 ]torch.jit.ignore ### [torch.jit.ignore](https://pytorch.org/docs/stable/generated/torch.jit.ignore.html#torch-jit-ignore) - ```python torch.jit.ignore(drop=False, **kwargs) ``` ### [paddle.jit.not_to_static](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/jit/not_to_static_cn.html#not-to-static) - ```python paddle.jit.not_to_static() ``` @@ -15,14 +12,12 @@ paddle.jit.not_to_static() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------------- | | drop | - | 是否完全移除该方法,Paddle 无此参数,暂无转写方式。 | ### 转写示例 - ```python # PyTorch 写法: class MyModule(nn.Module): diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.load.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.load.md index 4dc27e87ea6..b45d7ebad4d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.load.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.load.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.jit.load - +## [ torch 参数更多 ]torch.jit.load ### [torch.jit.load](https://pytorch.org/docs/stable/generated/torch.jit.load.html#torch.jit.load) - ```python torch.jit.load(f, map_location=None, _extra_files=None) ``` ### [paddle.jit.load](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/jit/load_cn.html) - ```python paddle.jit.load(path, **configs) ``` @@ -15,7 +12,6 @@ paddle.jit.load(path, **configs) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------------- | | f | path | PyTorch 为文件对象或文件名包含后缀,Paddle 为文件名不包含后缀,读取 .pdiparams,.pdmodel 等后缀文件。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | configs | 其他用于兼容的载入配置选项,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### f 参数用法不同 - ```python # PyTorch 写法: torch.jit.load('scriptmodule.pt') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.save.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.save.md index 8aba7774ed2..e0d4a0a28e6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.save.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.save.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.jit.save - +## [ torch 参数更多 ]torch.jit.save ### [torch.jit.save](https://pytorch.org/docs/stable/generated/torch.jit.save.html#torch-jit-save) - ```python torch.jit.save(m, f, _extra_files=None) ``` ### [paddle.jit.save](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/jit/save_cn.html#cn-api-paddle-jit-save) - ```python paddle.jit.save(layer, path, input_spec=None, **configs) ``` @@ -15,7 +12,6 @@ paddle.jit.save(layer, path, input_spec=None, **configs) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------------- | | m | layer | 需要存储的的函数/Module,仅参数名不一致。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | input_spec | 描述存储模型 forward 方法的输入,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### f: 参数用法不同 - ```python # PyTorch 写法: torch.jit.save(m, 'scriptmodule.pt') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.script.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.script.md index 1bad754aa95..fe0ae35de52 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.script.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.jit.script.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.jit.script - +## [ torch 参数更多 ]torch.jit.script ### [torch.jit.script](https://pytorch.org/docs/stable/generated/torch.jit.script.html#torch-jit-script) - ```python torch.jit.script(obj, optimize=None, _frames_up=0, _rcb=None, example_inputs=None) ``` ### [paddle.jit.to_static](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/jit/to_static_cn.html#paddle.jit.to_static) - ```python paddle.jit.to_static(function, input_spec=None, build_strategy=None, backend=None, **kwargs) ``` @@ -15,7 +12,6 @@ paddle.jit.to_static(function, input_spec=None, build_strategy=None, backend=Non PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------------- | | obj | function | 待转换的函数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lcm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lcm.md index daf03afdf89..7d42eb74ca1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lcm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lcm.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.lcm - +## [ torch 参数更多 ]torch.lcm ### [torch.lcm](https://pytorch.org/docs/stable/generated/torch.lcm.html#torch-lcm) - ```python torch.lcm(input, other, *, out=None) ``` ### [paddle.lcm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/lcm_cn.html#lcm) - ```python paddle.lcm(x, y, name=None) ``` @@ -15,7 +12,6 @@ paddle.lcm(x, y, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------- | | input | x | 表示输入的第一个 Tensor ,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.lcm(x,y, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.ldexp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.ldexp.md index e4226cf92ba..807f0a62075 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.ldexp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.ldexp.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.ldexp - ### [torch.ldexp](https://pytorch.org/docs/stable/generated/torch.ldexp.html#torch.ldexp) - ```python torch.ldexp(input, other, *, out=None) ``` ### [paddle.ldexp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/ldexp_cn.html#ldexp) - ```python paddle.ldexp(x, y, name=None) ``` @@ -15,7 +12,6 @@ paddle.ldexp(x, y, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -23,7 +19,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - ```python # PyTorch 写法 torch.ldexp(a, b, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lerp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lerp.md index 6e99601a57b..80b5134d34a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lerp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lerp.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.lerp +## [ torch 参数更多 ]torch.lerp ### [torch.lerp](https://pytorch.org/docs/stable/generated/torch.lerp.html?highlight=lerp#torch.lerp) - ```python torch.lerp(input, end, @@ -10,7 +9,6 @@ torch.lerp(input, ``` ### [paddle.lerp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/lerp_cn.html#lerp) - ```python paddle.lerp(x, y, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lgamma.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lgamma.md index 6d9a7f0117e..32e37d23070 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lgamma.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lgamma.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.lgamma +## [ torch 参数更多 ]torch.lgamma ### [torch.lgamma](https://pytorch.org/docs/stable/generated/torch.lgamma.html?highlight=lgamma#torch.lgamma) - ```python torch.lgamma(input, *, @@ -8,7 +7,6 @@ torch.lgamma(input, ``` ### [paddle.lgamma](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/lgamma_cn.html#lgamma) - ```python paddle.lgamma(x , name=None) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cholesky.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cholesky.md index f637e67be9d..4d81b16ec7a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cholesky.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cholesky.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.linalg.cholesky - +## [ torch 参数更多 ]torch.linalg.cholesky ### [torch.linalg.cholesky](https://pytorch.org/docs/stable/generated/torch.linalg.cholesky.html?highlight=linalg+cholesky#torch.linalg.cholesky) - ```python torch.linalg.cholesky(input, *, upper=False, out=None) ``` ### [paddle.linalg.cholesky](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/cholesky_cn.html) - ```python paddle.linalg.cholesky(x, upper=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.cholesky(x, upper=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------- | ------- | | input | x | 表示输入参数为多维 Tensor,它的维度应该为 [*, M, N],其中*为零或更大的批次尺寸,并且最里面的两个维度上的矩阵都应为对称的正定矩阵,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor ,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out: 输出的 Tensor - ```python # PyTorch 写法 torch.linalg.cholesky(x, upper=False, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cond.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cond.md index c2694b7828d..36635d67e54 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cond.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cond.md @@ -1,14 +1,11 @@ -## [torch 参数更多]torch.linalg.cond - +## [ torch 参数更多 ]torch.linalg.cond ### [torch.linalg.cond](https://pytorch.org/docs/stable/generated/torch.linalg.cond.html#torch.linalg.cond) - ```python # PyTorch 文档有误,第一个参数名为 input torch.linalg.cond(input, p=None, *, out=None) ``` ### [paddle.linalg.cond](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/linalg/cond_cn.html) - ```python paddle.linalg.cond(x, p=None, name=None) ``` @@ -16,7 +13,6 @@ paddle.linalg.cond(x, p=None, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.cond(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cross.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cross.md index da4d225eebc..e33a7f0c3b4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cross.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.cross.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.linalg.cross - ### [torch.linalg.cross](https://pytorch.org/docs/stable/generated/torch.linalg.cross.html?highlight=torch+linalg+cross#torch.linalg.cross) - ```python torch.linalg.cross(input, other, *, dim=- 1, out=None) ``` ### [paddle.cross](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/cross_cn.html) - ```python paddle.cross(x, y, axis=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.cross(x, y, axis=None, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -23,7 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | dim | axis | 表示进行运算的维度,参数默认值不一致。PyTorch 默认为`-1`,Paddle 默认为 `None`。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.det.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.det.md index 6d559257ad1..6832d0bd75e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.det.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.det.md @@ -1,28 +1,23 @@ ## [ torch 参数更多 ]torch.linalg.det ### [torch.linalg.det](https://pytorch.org/docs/stable/generated/torch.linalg.det.html#torch.linalg.det) - ```python torch.linalg.det(A, *, out=None) ``` ### [paddle.linalg.det](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/det_cn.html#det) - ```python paddle.linalg.det(x) ``` torch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | A | x | 表示输入的 Tensor ,仅参数名不一致。 | | out | - | 表示输出 Tensor, Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.det(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eig.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eig.md index 36eb3e90005..0caa46b4c52 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eig.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eig.md @@ -1,29 +1,23 @@ ## [ torch 参数更多 ]torch.linalg.eig - ### [torch.linalg.eig](https://pytorch.org/docs/stable/generated/torch.linalg.eig.html?highlight=torch+linalg+eig#torch.linalg.eig) - ```python torch.linalg.eig(input, *, out=None) ``` ### [paddle.linalg.eig](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/eig_cn.html) - ```python paddle.linalg.eig(x, name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 tuple,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.eig(t, out=(L,V)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigh.md index 55991e7599c..cbaf6f7b159 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigh.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.linalg.eigh - +## [ torch 参数更多 ]torch.linalg.eigh ### [torch.linalg.eigh](https://pytorch.org/docs/stable/generated/torch.linalg.eigh.html#torch.linalg.eigh) - ```python torch.linalg.eigh(input, UPLO='L', *, out=None) ``` ### [paddle.linalg.eigh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/eigh_cn.html) - ```python paddle.linalg.eigh(x, UPLO='L', name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.eigh(x, UPLO='L', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------ | | input | x | 输入 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.eigh(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigvals.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigvals.md index 05c4ec995ea..2c5eb3a3ff6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigvals.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigvals.md @@ -1,14 +1,11 @@ ## [ torch 参数更多 ]torch.linalg.eigvals - ### [torch.linalg.eigvals](https://pytorch.org/docs/stable/generated/torch.linalg.eigvals.html?highlight=torch+linalg+eigvals#torch.linalg.eigvals) - ```python torch.linalg.eigvals(input, out=None) ``` ### [paddle.linalg.eigvals](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/eigvals_cn.html) - ```python paddle.linalg.eigvals(x, name=None) @@ -16,16 +13,13 @@ paddle.linalg.eigvals(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.eigvals(t, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigvalsh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigvalsh.md index 2bd99550320..da2dcafad49 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigvalsh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.eigvalsh.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.linalg.eigvalsh - +## [ torch 参数更多 ]torch.linalg.eigvalsh ### [torch.linalg.eigvalsh](https://pytorch.org/docs/stable/generated/torch.linalg.eigvalsh.html#torch.linalg.eigvalsh) - ```python torch.linalg.eigvalsh(input, UPLO='L', *, out=None) ``` ### [paddle.linalg.eigvalsh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/eigvalsh_cn.html) - ```python paddle.linalg.eigvalsh(x, UPLO='L', name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.eigvalsh(x, UPLO='L', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.eigvalsh(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.householder_product.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.householder_product.md index beece6ddb66..69b854e100b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.householder_product.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.householder_product.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.linalg.householder_product - ### [torch.linalg.householder_product](https://pytorch.org/docs/stable/generated/torch.linalg.householder_product.html#torch.linalg.householder_product) - ```python torch.linalg.householder_product(input, tau, *, out=None) ``` ### [paddle.linalg.householder_product](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/householder_product_cn.html#householder-product) - ```python paddle.linalg.householder_product(x, tau, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.householder_product(x, tau, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.householder_product(x, tau, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.inv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.inv.md index ae4336d9dce..bdb5c21d753 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.inv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.inv.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.linalg.inv - +## [ torch 参数更多 ]torch.linalg.inv ### [torch.linalg.inv](https://pytorch.org/docs/stable/generated/torch.linalg.inv.html#torch.linalg.inv) - ```python torch.linalg.inv(A, *, out=None) ``` ### [paddle.linalg.inv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/inv_cn.html) - ```python paddle.linalg.inv(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.linalg.inv(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------- | | A | x | 输入 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.inv(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.lu_factor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.lu_factor.md index 5824172693a..ffe5d0ecad6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.lu_factor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.lu_factor.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.linalg.lu_factor - ### [torch.linalg.lu_factor](https://pytorch.org/docs/stable/generated/torch.linalg.lu_factor.html#torch.linalg.lu_factor) - ```python torch.linalg.lu_factor(A, *, pivot=True, out=None) ``` ### [paddle.linalg.lu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/lu_cn.html) - ```python paddle.linalg.lu(x, pivot=True, get_infos=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.lu(x, pivot=True, get_infos=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------- | | A | x | 表示需要进行 LU 分解的输入 Tensor ,仅参数名不一致。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor 元组 , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.lu_factor(A, out=(LU, pivots)) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.lu_factor_ex.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.lu_factor_ex.md index 8a8debe3298..19c03e61bf4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.lu_factor_ex.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.lu_factor_ex.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.linalg.lu_factor_ex - ### [torch.linalg.lu_factor_ex](https://pytorch.org/docs/stable/generated/torch.linalg.lu_factor_ex.html?highlight=lu_factor_ex#torch.linalg.lu_factor_ex) - ```python torch.linalg.lu_factor_ex(A, *, pivot=True, check_errors=False, out=None) ``` ### [paddle.linalg.lu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/lu_cn.html) - ```python paddle.linalg.lu(x, pivot=True, get_infos=True, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.lu(x, pivot=True, get_infos=True, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ----------------------------------------------------------------------------------------------------- | | A | x | 表示需要进行 LU 分解的输入 Tensor ,仅参数名不一致。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | 返回值 | 返回值 | 表示返回的 Tensor 元组 ,PyTorch 返回 info 的 shape 为[],Paddle 返回 info 的 shape 为[1],需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.lu_factor_ex(A, out=(LU, pivots, info)) @@ -40,7 +34,6 @@ paddle.assign(y[0], out[0]), paddle.assign(y[1], out[1]), paddle.assign(y[2], ou ``` #### 返回值 - ```python # PyTorch 写法 y = torch.linalg.lu_factor_ex(A) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_norm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_norm.md index 362e7717aef..402621b2307 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_norm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_norm.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.linalg.matrix_norm - +## [ torch 参数更多 ]torch.linalg.matrix_norm ### [torch.linalg.matrix_norm](https://pytorch.org/docs/stable/generated/torch.linalg.matrix_norm.html#torch.linalg.matrix_norm) - ```python torch.linalg.matrix_norm(input, ord='fro', dim=(-2, -1), keepdim=False, *, dtype=None, out=None) ``` ### [paddle.linalg.matrix_norm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/matrix_norm_cn.html) - ```python paddle.linalg.matrix_norm(x, p='fro', axis=[-2,-1], keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.matrix_norm(x, p='fro', axis=[-2,-1], keepdim=False, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | @@ -26,9 +22,7 @@ paddle.linalg.matrix_norm(x, p='fro', axis=[-2,-1], keepdim=False, name=None) | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.matrix_norm(x, out=y) @@ -38,7 +32,6 @@ paddle.assign(paddle.linalg.matrix_norm(x), y) ``` #### dtype:表示输出 Tensor 的数据类型 - ```python # PyTorch 写法 torch.linalg.matrix_norm(x, dtype=torch.float64) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_power.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_power.md index 2be52ad7935..740c802fe11 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_power.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_power.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.linalg.matrix_power ### [torch.linalg.matrix_power](https://pytorch.org/docs/stable/generated/torch.linalg.matrix_power.html?highlight=torch+linalg+matrix_power#torch.linalg.matrix_power) - ```python torch.linalg.matrix_power(input, n, @@ -9,7 +8,6 @@ torch.linalg.matrix_power(input, ``` ### [paddle.linalg.matrix_power](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/matrix_power_cn.html) - ```python paddle.linalg.matrix_power(x, n, @@ -18,7 +16,6 @@ paddle.linalg.matrix_power(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的欲进行 n 次幂运算的一个或一批方阵,类型为 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_rank.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_rank.md index 6350cb823dd..d8e89bad86d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_rank.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.matrix_rank.md @@ -1,4 +1,4 @@ -## [torch 参数更多 ]torch.linalg.matrix_rank +## [ torch 参数更多 ]torch.linalg.matrix_rank ### [torch.linalg.matrix_rank](https://pytorch.org/docs/stable/generated/torch.linalg.matrix_rank.html?highlight=matrix_rank#torch.linalg.matrix_rank) ```python torch.linalg.matrix_rank(A, *, atol=None, rtol=None ,hermitian=False, out=None) @@ -12,7 +12,6 @@ paddle.linalg.matrix_rank(x, tol=None, hermitian=False, atol=None, rtol=None, na PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | A | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.multi_dot.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.multi_dot.md index ab723dc0633..54b4a193a3a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.multi_dot.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.multi_dot.md @@ -1,14 +1,11 @@ ## [ torch 参数更多 ]torch.linalg.multi_dot - ### [torch.linalg.multi_dot](https://pytorch.org/docs/stable/generated/torch.linalg.multi_dot.html?highlight=torch+linalg+multi_dot#torch.linalg.multi_dot) - ```python torch.linalg.multi_dot(tensors, out=None) ``` ### [paddle.linalg.multi_dot](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/multi_dot_cn.html) - ```python paddle.linalg.multi_dot(x, name=None) @@ -16,16 +13,13 @@ paddle.linalg.multi_dot(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | tensors | x | 表示输入的一个 tensor 列表 ,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.multi_dot(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.pinv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.pinv.md index 3c661692c1f..3743d4893af 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.pinv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.pinv.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.linalg.pinv - +## [ torch 参数更多 ]torch.linalg.pinv ### [torch.linalg.pinv](https://pytorch.org/docs/stable/generated/torch.linalg.pinv.html#torch.linalg.pinv) - ```python torch.linalg.pinv(input, *, atol=None, rtol=None, hermitian=False, out=None) ``` ### [paddle.linalg.pinv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/pinv_cn.html) - ```python paddle.linalg.pinv(x, rcond=1e-15, hermitian=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.pinv(x, rcond=1e-15, hermitian=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | ------------------------------------------------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | @@ -25,9 +21,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.pinv(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.qr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.qr.md index ddba2b3bbde..ece3f5b5d13 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.qr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.qr.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.linalg.qr - +## [ torch 参数更多 ]torch.linalg.qr ### [torch.linalg.qr](https://pytorch.org/docs/stable/generated/torch.linalg.qr.html#torch.linalg.qr) - ```python torch.linalg.qr(A, mode='reduced', *, out=None) ``` ### [paddle.linalg.qr](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/qr_cn.html) - ```python paddle.linalg.qr(x, mode='reduced', name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.qr(x, mode='reduced', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------- | | A | x | 输入 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.qr(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.solve.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.solve.md index 3ae52d1649e..0ad0ef4332b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.solve.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.solve.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.linalg.solve - +## [ torch 参数更多 ]torch.linalg.solve ### [torch.linalg.solve](https://pytorch.org/docs/stable/generated/torch.linalg.solve.html#torch.linalg.solve) - ```python torch.linalg.solve(A, B, *, left=True, out=None) ``` ### [paddle.linalg.solve](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/solve_cn.html) - ```python paddle.linalg.solve(x, y, left=True, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.solve(x, y, left=True, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------ | | A | x | 输入线性方程组求解的一个或一批方阵,仅参数名不一致。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.solve(x1, x2, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.solve_triangular.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.solve_triangular.md index 45665f57303..7a22b258602 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.solve_triangular.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.solve_triangular.md @@ -1,14 +1,11 @@ ## [ torch 参数更多 ]torch.linalg.solve_triangular - ### [torch.linalg.solve_triangular](https://pytorch.org/docs/stable/generated/torch.linalg.solve_triangular.html?highlight=torch+linalg+solve_triangular#torch.linalg.solve_triangular) - ```python # PyTorch 文档有误,测试第一个参数为 input torch.linalg.solve_triangular(input, B, *, upper, left=True, unitriangular=False, out=None) ``` ### [paddle.linalg.triangular_solve](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/triangular_solve_cn.html) - ```python paddle.linalg.triangular_solve(x, y, upper=True, transpose=False, unitriangular=False, name=None) ``` @@ -16,7 +13,6 @@ paddle.linalg.triangular_solve(x, y, upper=True, transpose=False, unitriangular= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------- | ----------------------------------------------------------------------------------------------------------------- | | input | x | 表示线性方程组左边的系数 Tensor ,仅参数名不一致。 | @@ -27,9 +23,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### left:表示系数 Tensor 的位置设置 - ```python # PyTorch 写法, left 为 True torch.linalg.solve_triangular(input, B, upper, left=True) @@ -45,7 +39,6 @@ paddle.linalg.triangular_solve(input, B, upper, transpose=True) ``` #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.solve_triangular(input, B, upper, left, unitriangular, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.svd.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.svd.md index 591fb5a9e06..503cccd3516 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.svd.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.svd.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.linalg.svd - +## [ torch 参数更多 ]torch.linalg.svd ### [torch.linalg.svd](https://pytorch.org/docs/stable/generated/torch.linalg.svd.html?highlight=svd#torch.linalg.svd) - ```python torch.linalg.svd(A, full_matrices=True, *, driver=None, out=None) ``` ### [paddle.linalg.svd](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/svd_cn.html) - ```python paddle.linalg.svd(x, full_matrices=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.svd(x, full_matrices=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------- | ---------------------------------------------------------------------------------------------- | | A | x | 输入 Tensor,仅参数名不一致。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.svd(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.svdvals.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.svdvals.md index 3cf9db64776..d86f4757083 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.svdvals.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.svdvals.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.linalg.svdvals - +## [ torch 参数更多 ]torch.linalg.svdvals ### [torch.linalg.svdvals](https://pytorch.org/docs/stable/generated/torch.linalg.svdvals.html#torch.linalg.svdvals) - ```python torch.linalg.svdvals(A, *, driver=None, out=None) ``` ### [paddle.linalg.svdvals](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/tensor/linalg.py#L3019) - ```python paddle.linalg.svdvals(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.svdvals(x, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------- | ------------------------------------------------------------------------------------ | | A | x | 输入 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ paddle.linalg.svdvals(x, name=None) | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.linalg.svdvals(A=x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.vecdot.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.vecdot.md index a703a9d72d7..9ddebfbbef6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.vecdot.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linalg.vecdot.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.linalg.vecdot - +## [ torch 参数更多 ]torch.linalg.vecdot ### [torch.linalg.vecdot](https://pytorch.org/docs/stable/generated/torch.linalg.vecdot.html) - ```python torch.linalg.vecdot(x, y, *, dim=-1, out=None) ``` ### [paddle.linalg.vecdot](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/tensor/linalg.py#L1881) - ```python paddle.linalg.vecdot(x, y, axis=-1, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.vecdot(x, y, axis=-1, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------- | | x | x | 输入 Tensor。 | @@ -24,9 +20,7 @@ paddle.linalg.vecdot(x, y, axis=-1, name=None) | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linalg.vecdot(x=a, y=b, out=out) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linspace.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linspace.md index 60e1d8aa822..2b33bf0b560 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linspace.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.linspace.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.linspace - -### [torch.linspace](https://pytorch.org/docs/stable/generated/torch.linspace.html?highlight=linspace#torch.linspace) - +## [ torch 参数更多 ]torch.linspace +### [torch.linspace](https://pytorch.org/docs/stable/generated/torch.linspace.html?highlight=linspace#torch.linspace) ```python torch.linspace(start, end, @@ -14,8 +12,7 @@ torch.linspace(start, requires_grad=False) ``` -### [paddle.linspace](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linspace_cn.html) - +### [paddle.linspace](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linspace_cn.html) ```python paddle.linspace(start, stop, @@ -27,7 +24,6 @@ paddle.linspace(start, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------ | | start | start | 表示区间开始的变量。 | @@ -40,9 +36,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.linspace(0, 10, 5, out=y) @@ -52,7 +46,6 @@ paddle.assign(paddle.linspace(0, 10, 5), y) ``` #### device: Tensor 的设备 - ```python # PyTorch 写法 y = torch.linspace(0, 10, 5, device=torch.device('cpu')) @@ -63,7 +56,6 @@ y.cpu() ``` #### requires_grad:是否求梯度 - ```python # PyTorch 写法 y = torch.linspace(0, 10, 5, requires_grad=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.load.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.load.md index afe4fdfe901..c07c6f70dbe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.load.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.load.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.load - +## [ torch 参数更多 ]torch.load ### [torch.load](https://pytorch.org/docs/stable/generated/torch.load.html?highlight=load#torch.load) - ```python torch.load(f, map_location=None, @@ -13,7 +11,6 @@ torch.load(f, ``` ### [paddle.load](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/load_cn.html#load) - ```python paddle.load(path, **configs) @@ -22,7 +19,6 @@ paddle.load(path, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------------- | ------------ | ------------------------------------------------------------ | | f | path | 载入目标对象实例的路径/内存对象, 仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.log10.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.log10.md index 438254d671e..ca54ffa254b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.log10.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.log10.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.log10 +## [ torch 参数更多 ]torch.log10 ### [torch.log10](https://pytorch.org/docs/stable/generated/torch.log10.html?highlight=log10#torch.log10) - ```python torch.log10(input, *, @@ -8,7 +7,6 @@ torch.log10(input, ``` ### [paddle.log10](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/log10_cn.html#log10) - ```python paddle.log10(x, name=None) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.log1p.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.log1p.md index 8b052cefbfd..2fce0dbee13 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.log1p.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.log1p.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.log1p +## [ torch 参数更多 ]torch.log1p ### [torch.log1p](https://pytorch.org/docs/stable/generated/torch.log1p.html?highlight=log1p#torch.log1p) - ```python torch.log1p(input, *, @@ -8,7 +7,6 @@ torch.log1p(input, ``` ### [paddle.log1p](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/log1p_cn.html#log1p) - ```python paddle.log1p(x, name=None) @@ -16,7 +14,6 @@ paddle.log1p(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logaddexp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logaddexp.md index 65b232c4fcc..66a10756bed 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logaddexp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logaddexp.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.logaddexp - ### [torch.logaddexp](https://pytorch.org/docs/stable/generated/torch.logaddexp.html#torch.logaddexp) - ```python torch.logaddexp(input, other, *, out=None) ``` ### [paddle.logaddexp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/logaddexp_cn.html#logaddexp) - ```python paddle.logaddexp(x, y, name=None) ``` @@ -15,7 +12,6 @@ paddle.logaddexp(x, y, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - ```python # PyTorch 写法 torch.logaddexp(a, b, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logcumsumexp.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logcumsumexp.md index 0c0fa41ffa6..be7db72ba95 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logcumsumexp.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logcumsumexp.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.logcumsumexp - +## [ torch 参数更多 ]torch.logcumsumexp ### [torch.logcumsumexp](https://pytorch.org/docs/stable/generated/torch.logcumsumexp.html#torch-logcumsumexp) - ```python torch.logcumsumexp(input, dim, *, out=None) ``` ### [paddle.logcumsumexp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/logcumsumexp_cn.html#logcumsumexp) - ```python paddle.logcumsumexp(x, axis=None, dtype=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.logcumsumexp(x, axis=None, dtype=None, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | dtype | 表示输出 Tensor 的数据类型,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.logcumsumexp(x,dim=0, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logspace.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logspace.md index 31aa48b252a..561b79c1156 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logspace.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.logspace.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.logspace - -### [torch.logspace](https://pytorch.org/docs/stable/generated/torch.logspace.html?highlight=logspace#torch.logspace) - +## [ torch 参数更多 ]torch.logspace +### [torch.logspace](https://pytorch.org/docs/stable/generated/torch.logspace.html?highlight=logspace#torch.logspace) ```python torch.logspace(start, end, @@ -15,8 +13,7 @@ torch.logspace(start, requires_grad=False) ``` -### [paddle.logspace](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/logspace_cn.html) - +### [paddle.logspace](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/logspace_cn.html) ```python paddle.logspace(start, stop, @@ -29,7 +26,6 @@ paddle.logspace(start, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------ | | start | start | 表示区间开始值以 base 为底的指数。 | @@ -43,9 +39,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.logspace(0, 10, 5, 2, out=y) @@ -55,7 +49,6 @@ paddle.assign(paddle.logspace(0, 10, 5, 2), y) ``` #### device: Tensor 的设备 - ```python # PyTorch 写法 y = torch.logspace(0, 10, 5, 2, device=torch.device('cpu')) @@ -66,7 +59,6 @@ y.cpu() ``` #### requires_grad:是否求梯度 - ```python # PyTorch 写法 y = torch.logspace(0, 10, 5, 2, requires_grad=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lu.md index 491a1e98475..d91994aa47a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lu.md @@ -1,13 +1,10 @@ -## [torch 参数更多 ]torch.lu - +## [ torch 参数更多 ]torch.lu ### [torch.lu](https://pytorch.org/docs/stable/generated/torch.lu.html?highlight=lu#torch.lu) - ```python torch.lu(A, pivot=True, get_infos=False, out) ``` ### [paddle.linalg.lu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/lu_cn.html) - ```python paddle.linalg.lu(x, pivot=True, get_infos=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.lu(x, pivot=True, get_infos=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | A | x | 输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +20,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lu_unpack.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lu_unpack.md index f814e345476..8e47ada2907 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lu_unpack.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.lu_unpack.md @@ -1,12 +1,10 @@ -## [torch 参数更多 ]torch.lu_unpack +## [ torch 参数更多 ]torch.lu_unpack ### [torch.lu_unpack](https://pytorch.org/docs/stable/generated/torch.lu_unpack.html?highlight=lu_unpack#torch.lu_unpack) - ```python torch.lu_unpack(LU_data, LU_pivots, unpack_data=True, unpack_pivots=True, *, out=None) ``` ### [paddle.linalg.lu_unpack](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/lu_unpack_cn.html) - ```python paddle.linalg.lu_unpack(x, y, unpack_ludata=True, unpack_pivots=True, name=None) ``` @@ -14,7 +12,6 @@ paddle.linalg.lu_unpack(x, y, unpack_ludata=True, unpack_pivots=True, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | LU_data | x | 输入的 Tensor ,仅参数名不一致。 | @@ -24,7 +21,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.max_pool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.max_pool1d.md index f7cfb3b6c86..b99be00c829 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.max_pool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.max_pool1d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.max_pool1d - ### [torch.max\_pool1d](https://pytorch.org/docs/stable/jit_builtin_functions.html#supported-pytorch-functions) - ```python torch.max_pool1d(input, kernel_size, stride=[], padding=[0], dilation=[1], ceil_mode=False) ``` ### [paddle.nn.functional.max_pool1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_pool1d_cn.html) - ```python paddle.nn.functional.max_pool1d(x, kernel_size, stride=None, padding=0, return_mask=False, ceil_mode=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.max_pool1d(x, kernel_size, stride=None, padding=0, return_m PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------ | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.max_pool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.max_pool2d.md index a8688c5ec0a..06063d09f94 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.max_pool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.max_pool2d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.max_pool2d - ### [torch.max\_pool2d](https://pytorch.org/docs/stable/jit_builtin_functions.html#supported-pytorch-functions) - ```python torch.max_pool2d(input, kernel_size, stride=[], padding=[0, 0], dilation=[1, 1], ceil_mode=False) ``` ### [paddle.nn.functional.max_pool2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_pool2d_cn.html) - ```python paddle.nn.functional.max_pool2d(x, kernel_size, stride=None, padding=0, ceil_mode=False, return_mask=False, data_format='NCHW', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.max_pool2d(x, kernel_size, stride=None, padding=0, ceil_mod PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.median.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.median.md index ccbf206ca36..4e9f5f947cb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.median.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.median.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.median ### [torch.median](https://pytorch.org/docs/stable/generated/torch.median.html?highlight=median#torch.median) - ```python torch.median(input, dim=-1, @@ -10,7 +9,6 @@ torch.median(input, ``` ### [paddle.median](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/median_cn.html#median) - ```python paddle.median(x, axis=None, keepdim=False, mode='avg', name=None) ``` @@ -28,9 +26,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.median([3, 5], out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.meshgrid.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.meshgrid.md index 3d91848ea79..f33eac29ba8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.meshgrid.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.meshgrid.md @@ -1,12 +1,10 @@ -## [torch 参数更多]torch.meshgrid +## [ torch 参数更多 ]torch.meshgrid ### [torch.meshgrid](https://pytorch.org/docs/stable/generated/torch.meshgrid.html?highlight=meshgrid#torch.meshgrid) - ```python torch.meshgrid(*tensors, indexing=None) ``` ### [paddle.meshgrid](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/meshgrid_cn.html#meshgrid) - ```python paddle.meshgrid(*args, **kargs) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mm.md index de8a07a0927..387133f67f8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mm.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.mm ### [torch.mm](https://pytorch.org/docs/stable/generated/torch.mm.html?highlight=torch+mm#torch.mm) - ```python torch.mm(input, mat2, @@ -9,7 +8,6 @@ torch.mm(input, ``` ### [paddle.mm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/mm_cn.html) - ```python paddle.mm(input, mat2, name=None) ``` @@ -17,7 +15,6 @@ paddle.mm(input, mat2, name=None) PyTorch 相比 Paddle 支持更多其他参数,Paddle 多余参数保持默认即可,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input | 表示输入的第一个 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mode.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mode.md index 47888fd80a8..ebba9bddc3e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mode.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mode.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.mode - ### [torch.mode](https://pytorch.org/docs/stable/generated/torch.mode.html) - ```python torch.mode(input, dim=-1, keepdim=False, *, out=None) ``` ### [paddle.mode](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/mode_cn.html#mode) - ```python paddle.mode(x, axis=-1, keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.mode(x, axis=-1, keepdim=False, name=None) 其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | | input | x | 输入的多维 Tensor,仅参数名不一致。 | @@ -23,7 +19,7 @@ paddle.mode(x, axis=-1, keepdim=False, name=None) | keepdim | keepdim | 是否保留指定的轴。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.multiprocessing.spawn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.multiprocessing.spawn.md index 282c010c500..07c33658823 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.multiprocessing.spawn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.multiprocessing.spawn.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.multiprocessing.spawn - +## [ torch 参数更多 ]torch.multiprocessing.spawn ### [torch.multiprocessing.spawn](https://pytorch.org/docs/stable/multiprocessing.html#torch.multiprocessing.spawn) - ```python torch.multiprocessing.spawn(fn, args=(), nprocs=1, join=True, daemon=False, start_method='spawn') ``` ### [paddle.distributed.spawn](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/distributed/spawn_cn.html#spawn) - ```python paddle.distributed.spawn(func, args=(), nprocs=- 1, join=True, daemon=False, **options) ``` @@ -15,7 +12,6 @@ paddle.distributed.spawn(func, args=(), nprocs=- 1, join=True, daemon=False, **o PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------------- | | fn | func | Python 函数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mv.md index 1a809fa7c45..ee51afb5d7c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mv.md @@ -5,7 +5,6 @@ torch.mv(input, vec, out=None) ``` ### [paddle.mv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/mv_cn.html) - ```python paddle.mv(x, vec, name=None) ``` @@ -13,7 +12,6 @@ paddle.mv(x, vec, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -21,7 +19,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写 。 | ### 转写示例 - #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mvlgamma.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mvlgamma.md index 096f4389792..7644905af46 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mvlgamma.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.mvlgamma.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.mvlgamma - +## [ torch 参数更多 ]torch.mvlgamma ### [torch.mvlgamma](https://pytorch.org/docs/stable/generated/torch.mvlgamma.html) - ```python torch.mvlgamma(input, p, *, out=None) ``` ### [paddle.multigammaln](https://github.com/PaddlePaddle/Paddle/blob/be090bd0bc9ac7a8595296c316b3a6ed3dc60ba6/python/paddle/tensor/math.py#L5099) - ```python paddle.multigammaln(x, p, name=None) ``` @@ -15,7 +12,6 @@ paddle.multigammaln(x, p, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ paddle.multigammaln(x, p, name=None) | out | - | 表示输出的 Tensor, Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.mvlgamma(x, p, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nan_to_num.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nan_to_num.md index 86e8f62177e..b6c42c92409 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nan_to_num.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nan_to_num.md @@ -1,20 +1,16 @@ -## [torch 参数更多 ]torch.nan_to_num - +## [ torch 参数更多 ]torch.nan_to_num ### [torch.nan_to_num](https://pytorch.org/docs/stable/generated/torch.nan_to_num.html?highlight=nan_to_num#torch.nan_to_num) - ```python torch.nan_to_num(input, nan=0.0, posinf=None, neginf=None, *, out=None) ``` ### [paddle.nan_to_num](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nan_to_num_cn.html#nan-to-num) - ```python paddle.nan_to_num(x, nan=0.0, posinf=None, neginf=None, name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanmean.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanmean.md index 0937e182189..eff391a832c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanmean.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanmean.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.nanmean - ### [torch.nanmean](https://pytorch.org/docs/stable/generated/torch.nanmean.html?highlight=nanmean#torch.nanmean) - ```python torch.nanmean(input, dim=None, @@ -11,7 +9,6 @@ torch.nanmean(input, ``` ### [paddle.nanmean](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nanmean_cn.html) - ```python paddle.nanmean(x, axis=None, @@ -21,7 +18,6 @@ paddle.nanmean(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | @@ -31,9 +27,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,可选项,Paddle 无此参数,需要转写。 | ### 转写示例 - #### dytpe:指定数据类型 - ```python # PyTorch 写法 torch.nanmean(x, dim=-1, dtype=torch.float32,out=y) @@ -43,7 +37,6 @@ paddle.assign(paddle.nanmean(x.astype('float32'),dim=-1),y) ``` #### out:指定输出 - ```python # PyTorch 写法 torch.nanmean(t, dim=1,out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanmedian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanmedian.md index 5ddeccc6085..6859049bc72 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanmedian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanmedian.md @@ -1,6 +1,5 @@ -## [torch 参数更多]torch.nanmedian +## [ torch 参数更多 ]torch.nanmedian ### [torch.nanmedian](https://pytorch.org/docs/stable/generated/torch.nanmedian.html?highlight=nanmedian#torch.nanmedian) - ```python torch.nanmedian(input, dim=-1, @@ -10,7 +9,6 @@ torch.nanmedian(input, ``` ### [paddle.nanmedian](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nanmedian_cn.html#nanmedian) - ```python paddle.nanmedian(x, axis=None, keepdim=False, mode='avg', name=None) ``` @@ -28,7 +26,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanquantile.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanquantile.md index 12b56a8d4cc..bb5ec342611 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanquantile.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nanquantile.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.nanquantile - ### [torch.nanquantile](https://pytorch.org/docs/stable/generated/torch.nanquantile.html?highlight=nanquantile#torch.nanquantile) - ```python torch.nanquantile(input, q, @@ -13,7 +11,6 @@ torch.nanquantile(input, ``` ### [paddle.nanquantile](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nanquantile_cn.html#nanquantile) - ```python paddle.nanquantile(x, q, @@ -26,7 +23,6 @@ paddle.nanquantile(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.neg.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.neg.md index 5cc68d3ef51..c5e979aab1e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.neg.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.neg.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.neg - ### [torch.neg](https://pytorch.org/docs/stable/generated/torch.neg.html?highlight=neg#torch.neg) - ```python torch.neg(input, *, out=None) ``` ### [paddle.neg](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/neg_cn.html) - ```python paddle.neg(x, name=None) ``` @@ -15,13 +12,12 @@ paddle.neg(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.negative.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.negative.md index bd94eb2d301..3f0f78c715b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.negative.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.negative.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.negative - ### [torch.negative](https://pytorch.org/docs/stable/generated/torch.negative.html?highlight=torch+negative#torch.negative) - ```python torch.negative(input, *, out=None) ``` ### [paddle.neg](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/neg_cn.html) - ```python paddle.neg(x, name=None) ``` @@ -15,13 +12,12 @@ paddle.neg(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | -### 转写示例 +### 转写示例 #### out:指定输出 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nextafter.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nextafter.md index a88acf5dea6..b6fd452208a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nextafter.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nextafter.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.nextafter - ### [torch.nextafter](https://pytorch.org/docs/stable/generated/torch.nextafter.html?highlight=nextafter#torch.nextafter) - ```python torch.nextafter(input, other, @@ -10,7 +8,6 @@ torch.nextafter(input, ``` ### [paddle.nextafter](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nextafter_cn.html) - ```python paddle.nextafter(x, y, @@ -19,7 +16,6 @@ paddle.nextafter(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.AlphaDropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.AlphaDropout.md index 87684f418fe..3707c6b2d22 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.AlphaDropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.AlphaDropout.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.AlphaDropout - +## [ torch 参数更多 ]torch.nn.AlphaDropout ### [torch.nn.AlphaDropout](https://pytorch.org/docs/stable/generated/torch.nn.AlphaDropout.html#torch.nn.AlphaDropout) - ```python torch.nn.AlphaDropout(p=0.5, inplace=False) ``` ### [paddle.nn.AlphaDropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/AlphaDropout_cn.html) - ```python paddle.nn.AlphaDropout(p=0.5, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.AlphaDropout(p=0.5, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | p | p | 将输入节点置 0 的概率,即丢弃概率。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.BCELoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.BCELoss.md index b9dad3236b5..bf559a0d6a8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.BCELoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.BCELoss.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.BCELoss ### [torch.nn.BCELoss](https://pytorch.org/docs/stable/generated/torch.nn.BCELoss.html?highlight=bceloss#torch.nn.BCELoss) - ```python torch.nn.BCELoss(weight=None, size_average=None, @@ -9,7 +8,6 @@ torch.nn.BCELoss(weight=None, ``` ### [paddle.nn.BCELoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/BCELoss_cn.html#bceloss) - ```python paddle.nn.BCELoss(weight=None, reduction='mean', @@ -18,7 +16,6 @@ paddle.nn.BCELoss(weight=None, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | weight | weight | 表示每个 batch 二值交叉熵的权重。 | @@ -27,8 +24,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 表示应用于输出结果的计算方式。 | ### 转写示例 -#### size_average -size_average 为 True +#### size_averagesize_average 为 True ```python # PyTorch 写法 torch.nn.BCELoss(weight=w, size_average=True) @@ -46,8 +42,7 @@ torch.nn.BCELoss(weight=w, size_average=False) paddle.nn.BCELoss(weight=w, reduction='sum') ``` -#### reduce -reduce 为 True +#### reducereduce 为 True ```python # PyTorch 写法 torch.nn.BCELoss(weight=w, reduce=True) @@ -65,8 +60,7 @@ torch.nn.BCELoss(weight=w, reduce=False) paddle.nn.BCELoss(weight=w, reduction='none') ``` -#### reduction -reduction 为'none' +#### reductionreduction 为'none' ```python # PyTorch 写法 torch.nn.BCELoss(weight=w, reduction='none') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.BCEWithLogitsLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.BCEWithLogitsLoss.md index b79e5fdfa26..c48d414935e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.BCEWithLogitsLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.BCEWithLogitsLoss.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.BCEWithLogitsLoss ### [torch.nn.BCEWithLogitsLoss](https://pytorch.org/docs/stable/generated/torch.nn.BCEWithLogitsLoss.html#bcewithlogitsloss) - ```python torch.nn.BCEWithLogitsLoss(weight=None, size_average=None, @@ -10,7 +9,6 @@ torch.nn.BCEWithLogitsLoss(weight=None, ``` ### [paddle.nn.BCEWithLogitsLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/BCEWithLogitsLoss_cn.html#bcewithlogitsloss) - ```python paddle.nn.BCEWithLogitsLoss(weight=None, reduction='mean', @@ -20,7 +18,6 @@ paddle.nn.BCEWithLogitsLoss(weight=None, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | weight | weight | 表示每个 batch 二值交叉熵的权重。 | @@ -30,8 +27,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | pos_weight | pos_weight | 表示正类的权重。 | ### 转写示例 -#### size_average -size_average 为 True +#### size_averagesize_average 为 True ```python # PyTorch 写法 torch.nn.BCEWithLogitsLoss(weight=w, size_average=True) @@ -49,8 +45,7 @@ torch.nn.BCEWithLogitsLoss(weight=w, size_average=False) paddle.nn.BCEWithLogitsLoss(weight=w, reduction='sum') ``` -#### reduce -reduce 为 True +#### reducereduce 为 True ```python # PyTorch 写法 torch.nn.BCEWithLogitsLoss(weight=w, reduce=True) @@ -68,8 +63,7 @@ torch.nn.BCEWithLogitsLoss(weight=w, reduce=False) paddle.nn.BCEWithLogitsLoss(weight=w, reduction='none') ``` -#### reduction -reduction 为'none' +#### reductionreduction 为'none' ```python # PyTorch 写法 torch.nn.BCEWithLogitsLoss(weight=w, reduction='none') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Bilinear.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Bilinear.md index 800b69c04e6..467eb810f5d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Bilinear.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Bilinear.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.Bilinear - +## [ torch 参数更多 ]torch.nn.Bilinear ### [torch.nn.Bilinear](https://pytorch.org/docs/stable/generated/torch.nn.Bilinear.html#torch.nn.Bilinear) - ```python torch.nn.Bilinear(in1_features, in2_features, out_features, bias=True, device=None, dtype=None) ``` ### [paddle.nn.Bilinear](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Bilinear_cn.html) - ```python paddle.nn.Bilinear(in1_features, in2_features, out_features, weight_attr=None, bias_attr=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.Bilinear(in1_features, in2_features, out_features, weight_attr=None, b PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | --------------------------------------------------------------- | | in1_features | in1_features | 每个 x1 元素的维度。 | @@ -27,9 +23,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | weight_attr | 指定权重参数属性的对象,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### device:Tensor 的设备 - ```python # PyTorch 写法 m = torch.nn.Bilinear(in1_features, in2_features, out_features,device=torch.device('cpu')) @@ -41,7 +35,6 @@ y = m(x).cpu() ``` #### dtype:Tensor 的数据类型 - ```python # PyTorch 写法 m = torch.nn.Bilinear(in1_features, in2_features, out_features,dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CELU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CELU.md index c35de1e2db3..f2bdbd7bf49 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CELU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CELU.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.CELU - +## [ torch 参数更多 ]torch.nn.CELU ### [torch.nn.CELU](https://pytorch.org/docs/stable/generated/torch.nn.CELU.html#torch.nn.CELU) - ```python torch.nn.CELU(alpha=1.0, inplace=False) ``` ### [paddle.nn.CELU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/CELU_cn.html) - ```python paddle.nn.CELU(alpha=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.CELU(alpha=1.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | alpha | alpha | CELU 的 alpha 值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CTCLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CTCLoss.md index 69ed1ae3055..45db3c1c380 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CTCLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CTCLoss.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.nn.CTCLoss - +## [ torch 参数更多 ]torch.nn.CTCLoss ### [torch.nn.CTCLoss](https://pytorch.org/docs/stable/generated/torch.nn.CTCLoss.html#torch.nn.CTCLoss) - ```python torch.nn.CTCLoss(blank=0, reduction='mean', @@ -9,7 +7,6 @@ torch.nn.CTCLoss(blank=0, ``` ### [paddle.nn.CTCLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/CTCLoss_cn.html#ctcloss) - ```python paddle.nn.CTCLoss(blank=0, reduction='mean') @@ -18,7 +15,6 @@ paddle.nn.CTCLoss(blank=0, 其中,torch 的 log_softmax+ctc_loss 相当于 paddle 的 ctc_loss,是一个二对一的情况,暂时无法转写,且 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------ | | blank | blank | 空格标记的 ID 值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CosineEmbeddingLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CosineEmbeddingLoss.md index 330c7d26585..d6ea443bc38 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CosineEmbeddingLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CosineEmbeddingLoss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.CosineEmbeddingLoss - +## [ torch 参数更多 ]torch.nn.CosineEmbeddingLoss ### [torch.nn.CosineEmbeddingLoss](https://pytorch.org/docs/stable/generated/torch.nn.CosineEmbeddingLoss.html#torch.nn.CosineEmbeddingLoss) - ```python torch.nn.CosineEmbeddingLoss(margin=0.0, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.CosineEmbeddingLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/CosineEmbeddingLoss_cn.html) - ```python paddle.nn.CosineEmbeddingLoss(margin=0, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.CosineEmbeddingLoss(margin=0, reduction='mean', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------------------------------------- | | margin | margin | 可以设置的范围为[-1, 1]。 | @@ -24,7 +20,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CrossEntropyLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CrossEntropyLoss.md index 1eef5b9aad1..55d63720a90 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CrossEntropyLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.CrossEntropyLoss.md @@ -1,6 +1,5 @@ -## [torch 参数更多]torch.nn.CrossEntropyLoss +## [ torch 参数更多 ]torch.nn.CrossEntropyLoss ### [torch.nn.CrossEntropyLoss](https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html#torch.nn.CrossEntropyLoss) - ```python torch.nn.CrossEntropyLoss(weight=None, size_average=None, @@ -11,7 +10,6 @@ torch.nn.CrossEntropyLoss(weight=None, ``` ### [paddle.nn.CrossEntropyLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/CrossEntropyLoss_cn.html#crossentropyloss) - ```python paddle.nn.CrossEntropyLoss(weight=None, ignore_index=-100, @@ -25,7 +23,6 @@ paddle.nn.CrossEntropyLoss(weight=None, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | weight | weight | 表示每个类别的权重。 | @@ -38,8 +35,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | axis | 进行 softmax 计算的维度索引,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 -#### size_average -size_average 为 True +#### size_averagesize_average 为 True ```python # PyTorch 写法 torch.nn.CrossEntropyLoss(weight=w, size_average=True) @@ -57,8 +53,7 @@ torch.nn.CrossEntropyLoss(weight=w, size_average=False) paddle.nn.CrossEntropyLoss(weight=w, reduction='sum') ``` -#### reduce -reduce 为 True +#### reducereduce 为 True ```python # PyTorch 写法 torch.nn.CrossEntropyLoss(weight=w, reduce=True) @@ -76,8 +71,7 @@ torch.nn.CrossEntropyLoss(weight=w, reduce=False) paddle.nn.CrossEntropyLoss(weight=w, reduction='none') ``` -#### reduction -reduction 为'none' +#### reductionreduction 为'none' ```python # PyTorch 写法 torch.nn.CrossEntropyLoss(weight=w, reduction='none') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.DataParallel.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.DataParallel.md index 45f7482c55d..4189a7dc691 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.DataParallel.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.DataParallel.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.DataParallel ### [torch.nn.DataParallel](https://pytorch.org/docs/stable/generated/torch.nn.DataParallel.html?highlight=dataparallel#torch.nn.DataParallel) - ```python torch.nn.DataParallel(module, device_ids=None, @@ -9,7 +8,6 @@ torch.nn.DataParallel(module, ``` ### [paddle.DataParallel](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/DataParallel_cn.html#dataparallel) - ```python paddle.DataParallel(layers, strategy=None, @@ -21,7 +19,6 @@ paddle.DataParallel(layers, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | module | layers | 需要通过数据并行方式执行的模型。 | @@ -34,7 +31,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | find_unused_parameters | 是否在模型 forward 函数的返回值的所有张量中,遍历整个向后图,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### device_ids:指定使用哪些 GPU 训练 ``` python # PyTorch 写法: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout.md index fb8b79c425f..13ad9417fea 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout.md @@ -15,7 +15,6 @@ paddle.nn.Dropout(p=0.5, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | p | p | 表示丢弃概率。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout1d.md index bc6cee01650..044a847f13f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout1d.md @@ -1,14 +1,11 @@ ## [ torch 参数更多 ]torch.nn.Dropout1d - ### [torch.nn.Dropout1d](https://pytorch.org/docs/stable/generated/torch.nn.Dropout1d.html#torch.nn.Dropout1d) - ```python torch.nn.Dropout1d(p=0.5, inplace=False) ``` ### [paddle.nn.Dropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Dropout_cn.html#dropout) - ```python paddle.nn.Dropout(p=0.5, axis=None, @@ -19,7 +16,6 @@ paddle.nn.Dropout(p=0.5, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | p | p | 表示丢弃概率。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout2d.md index 17517ea24ac..42334bd2da9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout2d.md @@ -1,5 +1,4 @@ -## [ torch 参数更多 ] torch.nn.Dropout2d - +## [ torch 参数更多 ]torch.nn.Dropout2d ### [torch.nn.Dropout2d](https://pytorch.org/docs/stable/generated/torch.nn.Dropout2d.html?highlight=dropout2d#torch.nn.Dropout2d) ```python torch.nn.Dropout2d(p=0.5, @@ -15,7 +14,6 @@ paddle.nn.Dropout2D(p=0.5, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | p | p | 表示丢弃概率。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout3d.md index d8fa53768a1..80fcc7ce708 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Dropout3d.md @@ -1,5 +1,4 @@ ## [ torch 参数更多 ]torch.nn.Dropout3d - ### [torch.nn.Dropout3d](https://pytorch.org/docs/stable/generated/torch.nn.Dropout3d.html?highlight=dropout3d#torch.nn.Dropout3d) ```python torch.nn.Dropout3d(p=0.5, @@ -15,7 +14,6 @@ paddle.nn.Dropout3D(p=0.5, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | p | p | 表示丢弃概率。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ELU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ELU.md index 52ee45bb8dc..d9cf745c071 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ELU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ELU.md @@ -1,13 +1,11 @@ ## [ torch 参数更多 ]torch.nn.ELU ### [torch.nn.ELU](https://pytorch.org/docs/stable/generated/torch.nn.ELU.html?highlight=elu#torch.nn.ELU) - ```python torch.nn.ELU(alpha=1.0, inplace=False) ``` ### [paddle.nn.ELU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/ELU_cn.html#elu) - ```python paddle.nn.ELU(alpha=1.0, name=None) @@ -15,7 +13,6 @@ paddle.nn.ELU(alpha=1.0, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | alpha | alpha | 表示公式中的超参数。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FeatureAlphaDropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FeatureAlphaDropout.md index 5497ad6e250..c2dafad015c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FeatureAlphaDropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FeatureAlphaDropout.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.FeatureAlphaDropout - +## [ torch 参数更多 ]torch.nn.FeatureAlphaDropout ### [torch.nn.FeatureAlphaDropout](https://pytorch.org/docs/stable/generated/torch.nn.FeatureAlphaDropout.html#torch.nn.FeatureAlphaDropout) - ```python torch.nn.FeatureAlphaDropout(p=0.5, inplace=False) ``` ### [paddle.nn.FeatureAlphaDropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/FeatureAlphaDropout_cn.html) - ```python paddle.nn.FeatureAlphaDropout(p=0.5, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.FeatureAlphaDropout(p=0.5, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | p | p | 将输入节点置 0 的概率,即丢弃概率。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FractionalMaxPool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FractionalMaxPool2d.md index cd4005274bf..426514d50e4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FractionalMaxPool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FractionalMaxPool2d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.FractionalMaxPool2d - ### [torch.nn.FractionalMaxPool2d](https://pytorch.org/docs/stable/generated/torch.nn.FractionalMaxPool2d.html#fractionalmaxpool2d) - ```python torch.nn.FractionalMaxPool2d(kernel_size, output_size=None, output_ratio=None, return_indices=False, _random_samples=None) ``` ### [paddle.nn.FractionalMaxPool2D](https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/FractionalMaxPool2D_cn.html) - ```python paddle.nn.FractionalMaxPool2D(output_size, kernel_size=None, random_u=None, return_mask=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.FractionalMaxPool2D(output_size, kernel_size=None, random_u=None, retu PyTorch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示核大小。参数完全一致。 | @@ -25,9 +21,7 @@ PyTorch 参数更多,具体如下: | _random_samples | random_u | 表示随机数。PyTorch 以列表形式的 Tensor 方式传入,Paddle 以 float 的方式传入,如果 PyTorch 的多个随机数相同,需要转写,如果 PyTorch 的多个随机数不同,暂无转写方式。 | ### 转写示例 - #### output_ratio:目标输出比例 - ```python # 假设 intput 的 with=7, height=7, # output_ratio = 0.75, 则目标 output 的 width = int(7*0.75) = 5, height = int(7*0.75) = 5 @@ -39,7 +33,6 @@ paddle.nn.FractionalMaxPool2D(output_size=[5, 5], kernel_size=2, return_mask=Tru ``` #### _random_samples:随机数 - ```python # Pytorch 写法 torch.nn.FractionalMaxPool2d(2, output_size=[3, 3], return_indices=True, _random_samples=torch.tensor([[[0.3, 0.3]]])) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FractionalMaxPool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FractionalMaxPool3d.md index 7bbbd3d5eca..481b4c72c6e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FractionalMaxPool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.FractionalMaxPool3d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.FractionalMaxPool3d - ### [torch.nn.FractionalMaxPool3d](https://pytorch.org/docs/stable/generated/torch.nn.FractionalMaxPool3d.html#fractionalmaxpool3d) - ```python torch.nn.FractionalMaxPool3d(kernel_size, output_size=None, output_ratio=None, return_indices=False, _random_samples=None) ``` ### [paddle.nn.FractionalMaxPool3D](https://www.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/nn/FractionalMaxPool3D_cn.html) - ```python paddle.nn.FractionalMaxPool3D(output_size, kernel_size=None, random_u=None, return_mask=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.FractionalMaxPool3D(output_size, kernel_size=None, random_u=None, retu PyTorch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示核大小。参数完全一致。 | @@ -25,9 +21,7 @@ PyTorch 参数更多,具体如下: | _random_samples | random_u | 表示随机数。PyTorch 以列表形式的 Tensor 方式传入,Paddle 以 float 的方式传入,如果 PyTorch 的多个随机数相同,需要转写,如果 PyTorch 的多个随机数不同,暂无转写方式。 | ### 转写示例 - #### output_ratio:目标输出比例 - ```python # 假设 intput 的 depth=7, with=7, height=7, # output_ratio = 0.75, 则目标 output 的 depth = int(7*0.75) = 5, width = int(7*0.75) = 5, height = int(7*0.75) = 5 @@ -39,7 +33,6 @@ paddle.nn.FractionalMaxPool2D(output_size=[5, 5, 5], kernel_size=2, return_mask= ``` #### _random_samples:随机数 - ```python # Pytorch 写法 torch.nn.FractionalMaxPool3d(2, output_size=[3, 3, 3], return_indices=True, _random_samples=torch.tensor([[[0.3, 0.3, 0.3]]])) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.GroupNorm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.GroupNorm.md index 075ceaf6da8..b6ee620892b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.GroupNorm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.GroupNorm.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.GroupNorm ### [torch.nn.GroupNorm](https://pytorch.org/docs/stable/generated/torch.nn.GroupNorm.html?highlight=groupnorm#torch.nn.GroupNorm) - ```python torch.nn.GroupNorm(num_groups, num_channels, @@ -11,7 +10,6 @@ torch.nn.GroupNorm(num_groups, ``` ### [paddle.nn.GroupNorm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/GroupNorm_cn.html#groupnorm) - ```python paddle.nn.GroupNorm(num_groups, num_channels, @@ -25,7 +23,6 @@ paddle.nn.GroupNorm(num_groups, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | eps | epsilon | 为了数值稳定加在分母上的值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardsigmoid.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardsigmoid.md index f1bf94a23ab..2fad381d63b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardsigmoid.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardsigmoid.md @@ -1,19 +1,16 @@ -## [torch 参数更多 ]torch.nn.Hardsigmoid +## [ torch 参数更多 ]torch.nn.Hardsigmoid ### [torch.nn.Hardsigmoid](https://pytorch.org/docs/stable/generated/torch.nn.Hardsigmoid.html?highlight=hardsigmoid#torch.nn.Hardsigmoid) - ```python torch.nn.Hardsigmoid(inplace=False) ``` ### [paddle.nn.Hardsigmoid](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Hardsigmoid_cn.html#hardsigmoid) - ```python paddle.nn.Hardsigmoid(name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | inplace | - | 在不更改变量的内存地址的情况下,直接修改变量的值,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardswish.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardswish.md index d065c0c867c..6e832a55b2a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardswish.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardswish.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.Hardswish - +## [ torch 参数更多 ]torch.nn.Hardswish ### [torch.nn.Hardswish](https://pytorch.org/docs/stable/generated/torch.nn.Hardswish.html#torch.nn.Hardswish) - ```python torch.nn.Hardswish(inplace=False) ``` ### [paddle.nn.Hardswish](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Hardswish_cn.html) - ```python paddle.nn.Hardswish(name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.Hardswish(name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------------------------------------------------------- | | inplace | - | 在不更改变量的内存地址的情况下,直接修改变量的值,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardtanh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardtanh.md index b118b73481a..d0419a305f0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardtanh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Hardtanh.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.Hardtanh - +## [ torch 参数更多 ]torch.nn.Hardtanh ### [torch.nn.Hardtanh](https://pytorch.org/docs/stable/generated/torch.nn.Hardtanh.html#torch.nn.Hardtanh) - ```python torch.nn.Hardtanh(min_val=- 1.0, max_val=1.0, inplace=False) ``` ### [paddle.nn.Hardtanh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Hardtanh_cn.html) - ```python paddle.nn.Hardtanh(min=- 1.0, max=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.Hardtanh(min=- 1.0, max=1.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------------------------------------------------------------------- | | min_val | min | Hardtanh 激活计算公式中的 min 值,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.HingeEmbeddingLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.HingeEmbeddingLoss.md index b57799bcc83..38b03afd1cb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.HingeEmbeddingLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.HingeEmbeddingLoss.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.nn.HingeEmbeddingLoss - +## [ torch 参数更多 ]torch.nn.HingeEmbeddingLoss ### [torch.nn.HingeEmbeddingLoss](https://pytorch.org/docs/stable/generated/torch.nn.HingeEmbeddingLoss.html#hingeembeddingloss) - ```python torch.nn.HingeEmbeddingLoss(margin=1.0, size_average=None, @@ -10,7 +8,6 @@ torch.nn.HingeEmbeddingLoss(margin=1.0, ``` ### [paddle.nn.HingeEmbeddingLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/HingeEmbeddingLoss_cn.html#hingeembeddingloss) - ```python paddle.nn.HingeEmbeddingLoss(margin=1.0, reduction='mean', @@ -20,7 +17,6 @@ paddle.nn.HingeEmbeddingLoss(margin=1.0, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------ | | margin | margin | 当 label 为-1 时,该值决定了小于 margin 的 input 才需要纳入 hinge embedding loss 的计算。 | @@ -29,9 +25,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 表示应用于输出结果的计算方式。 | ### 转写示例 - #### size_average - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.InstanceNorm3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.InstanceNorm3d.md index c167070048a..a5186032f74 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.InstanceNorm3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.InstanceNorm3d.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.InstanceNorm3d - +## [ torch 参数更多 ]torch.nn.InstanceNorm3d ### [torch.nn.InstanceNorm3d](https://pytorch.org/docs/stable/generated/torch.nn.InstanceNorm3d.html#torch.nn.InstanceNorm3d) - ```python torch.nn.InstanceNorm3d(num_features, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False, device=None, dtype=None) ``` ### [paddle.nn.InstanceNorm3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/InstanceNorm3D_cn.html) - ```python paddle.nn.InstanceNorm3D(num_features, epsilon=1e-05, momentum=0.9, weight_attr=None, bias_attr=None, data_format="NCDHW", name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.InstanceNorm3D(num_features, epsilon=1e-05, momentum=0.9, weight_attr= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------- | ------------ | --------------------------------------------------------------- | | num_features | num_features | 输入 Tensor 的通道数量。 | @@ -30,9 +26,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | data_format | 指定输入数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### affine:是否进行仿射变换 - ```python # 当 PyTorch 的 affine 为`False`,表示 weight 和 bias 不进行更新,torch 写法 torch.nn.InstanceNorm3d(num_features, affine=False) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.KLDivLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.KLDivLoss.md index 11b20ffacdf..7a8cb853d9d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.KLDivLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.KLDivLoss.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.nn.KLDivLoss +## [ torch 参数更多 ]torch.nn.KLDivLoss ### [torch.nn.KLDivLoss](https://pytorch.org/docs/stable/generated/torch.nn.KLDivLoss.html?highlight=kldivloss#torch.nn.KLDivLoss) - ```python torch.nn.KLDivLoss(size_average=None, reduce=None, @@ -9,7 +8,6 @@ torch.nn.KLDivLoss(size_average=None, ``` ### [paddle.nn.KLDivLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/KLDivLoss_cn.html#kldivloss) - ```python paddle.nn.KLDivLoss(reduction='mean', log_target=False) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.L1Loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.L1Loss.md index 5bc5f9ce4df..2e517c82882 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.L1Loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.L1Loss.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.L1Loss ### [torch.nn.L1Loss](https://pytorch.org/docs/stable/generated/torch.nn.L1Loss.html?highlight=l1loss#torch.nn.L1Loss) - ```python torch.nn.L1Loss(size_average=None, reduce=None, @@ -8,7 +7,6 @@ torch.nn.L1Loss(size_average=None, ``` ### [paddle.nn.L1Loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/L1Loss_cn.html#l1loss) - ```python paddle.nn.L1Loss(reduction='mean', name=None) @@ -16,7 +14,6 @@ paddle.nn.L1Loss(reduction='mean', PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | size_average | - | 已弃用。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.LayerNorm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.LayerNorm.md index 83b99f3a097..61ede34ba40 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.LayerNorm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.LayerNorm.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.nn.LayerNorm +## [ torch 参数更多 ]torch.nn.LayerNorm ### [torch.nn.LayerNorm](https://pytorch.org/docs/stable/generated/torch.nn.LayerNorm.html?highlight=layernorm#torch.nn.LayerNorm) - ```python torch.nn.LayerNorm(normalized_shape, eps=1e-05, @@ -10,7 +9,6 @@ torch.nn.LayerNorm(normalized_shape, ``` ### [paddle.nn.LayerNorm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/LayerNorm_cn.html#layernorm) - ```python paddle.nn.LayerNorm(normalized_shape, epsilon=1e-05, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.LeakyReLU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.LeakyReLU.md index fba19fde2b4..eb03f90ccdb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.LeakyReLU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.LeakyReLU.md @@ -1,13 +1,11 @@ ## [ torch 参数更多 ]torch.nn.LeakyReLU ### [torch.nn.LeakyReLU](https://pytorch.org/docs/stable/generated/torch.nn.LeakyReLU.html?highlight=leakyrelu#torch.nn.LeakyReLU) - ```python torch.nn.LeakyReLU(negative_slope=0.01, inplace=False) ``` ### [paddle.nn.LeakyReLU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/LeakyReLU_cn.html#leakyrelu) - ```python paddle.nn.LeakyReLU(negative_slope=0.01, name=None) @@ -15,7 +13,6 @@ paddle.nn.LeakyReLU(negative_slope=0.01, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | negative_slope | negative_slope | 表示 x<0 时的斜率。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MSELoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MSELoss.md index 8f8904c4ede..977da916580 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MSELoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MSELoss.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.nn.MSELoss +## [ torch 参数更多 ]torch.nn.MSELoss ### [torch.nn.MSELoss](https://pytorch.org/docs/stable/generated/torch.nn.MSELoss.html?highlight=mseloss#torch.nn.MSELoss) - ```python torch.nn.MSELoss(size_average=None, reduce=None, @@ -8,14 +7,12 @@ torch.nn.MSELoss(size_average=None, ``` ### [paddle.nn.MSELoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MSELoss_cn.html#mseloss) - ```python paddle.nn.MSELoss(reduction='mean') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | size_average | - | 已弃用。 | @@ -24,7 +21,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 #### size_average - ```python # Paddle 写法 torch.nn.MSELoss(size_average=True) @@ -34,7 +30,6 @@ paddle.nn.MSELoss(reduction='mean') ``` #### size_average - size_average 为 True ```python @@ -56,7 +51,6 @@ paddle.nn.MSELoss(reduction='sum') ``` #### reduce - reduce 为 True ```python @@ -78,7 +72,6 @@ paddle.nn.MSELoss(reduction='none') ``` #### reduction - reduction 为'none' ```python diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MarginRankingLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MarginRankingLoss.md index 09da4bf052a..be735587110 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MarginRankingLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MarginRankingLoss.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.nn.MarginRankingLoss - +## [ torch 参数更多 ]torch.nn.MarginRankingLoss ### [torch.nn.MarginRankingLoss](https://pytorch.org/docs/stable/generated/torch.nn.MarginRankingLoss.html#marginrankingloss) - ```python torch.nn.MarginRankingLoss(margin=0.0, size_average=None, @@ -10,7 +8,6 @@ torch.nn.MarginRankingLoss(margin=0.0, ``` ### [paddle.nn.MarginRankingLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MarginRankingLoss_cn.html#marginrankingloss) - ```python paddle.nn.MarginRankingLoss(margin=0.0, reduction='mean', @@ -20,7 +17,6 @@ paddle.nn.MarginRankingLoss(margin=0.0, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -------------------------------------------- | | margin | margin | 用于加和的 margin 值。 | @@ -29,9 +25,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 表示应用于输出结果的计算方式。 | ### 转写示例 - #### size_average - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool1d.md index a544b55feae..c3cecd0a003 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool1d.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.nn.MaxPool1d +## [ torch 参数更多 ]torch.nn.MaxPool1d ### [torch.nn.MaxPool1d](https://pytorch.org/docs/stable/generated/torch.nn.MaxPool1d.html?highlight=maxpool1d#torch.nn.MaxPool1d) - ```python torch.nn.MaxPool1d(kernel_size, stride=None, @@ -11,7 +10,6 @@ torch.nn.MaxPool1d(kernel_size, ``` ### [paddle.nn.MaxPool1D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MaxPool1D_cn.html#maxpool1d) - ```python paddle.nn.MaxPool1D(kernel_size, stride=None, @@ -23,7 +21,6 @@ paddle.nn.MaxPool1D(kernel_size, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示池化核大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool2d.md index 377616b2a51..49a8a280ef9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool2d.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.MaxPool2d ### [torch.nn.MaxPool2d](https://pytorch.org/docs/stable/generated/torch.nn.MaxPool2d.html?highlight=maxpool2d#torch.nn.MaxPool2d) - ```python torch.nn.MaxPool2d(kernel_size, stride=None, @@ -11,7 +10,6 @@ torch.nn.MaxPool2d(kernel_size, ``` ### [paddle.nn.MaxPool2D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MaxPool2D_cn.html#maxpool2d) - ```python paddle.nn.MaxPool2D(kernel_size, stride=None, @@ -23,7 +21,6 @@ paddle.nn.MaxPool2D(kernel_size, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | kernel_size | kernel_size | 表示池化核大小。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool3d.md index b495170ac79..b8f9139541e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MaxPool3d.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.MaxPool3d ### [torch.nn.MaxPool3d](https://pytorch.org/docs/stable/generated/torch.nn.MaxPool3d.html?highlight=maxpool3d#torch.nn.MaxPool3d) - ```python torch.nn.MaxPool3d(kernel_size, stride=None, @@ -11,7 +10,6 @@ torch.nn.MaxPool3d(kernel_size, ``` ### [paddle.nn.MaxPool3D](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MaxPool3D_cn.html#maxpool3d) - ```python paddle.nn.MaxPool3D(kernel_size, stride=None, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Mish.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Mish.md index 8b7e0e054cf..d85b5f09efe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Mish.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Mish.md @@ -1,20 +1,16 @@ ## [ torch 参数更多 ]torch.nn.Mish - ### [torch.nn.Mish](https://pytorch.org/docs/stable/generated/torch.nn.Mish.html?highlight=torch+nn+mish) - ```python torch.nn.Mish(inplace=False) ``` ### [paddle.nn.Mish](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Mish_cn.html) - ```python paddle.nn.Mish(name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | inplace | - | 表示在不更改变量的内存地址的情况下,直接修改变量的值,主要功能为节省显存,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.load_state_dict.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.load_state_dict.md index e5d964f28ea..8b2a9b478fd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.load_state_dict.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.load_state_dict.md @@ -1,12 +1,10 @@ -## [ torch 参数更多 ] torch.nn.Module.load_state_dict +## [ torch 参数更多 ]torch.nn.Module.load_state_dict ### [torch.nn.Module.load_state_dict](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.load_state_dict) - ```python torch.nn.Module.load_state_dict(state_dict, strict=True) ``` ### [paddle.nn.Layer.set_state_dict](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#set-state-dict-state-dict-use-structured-name-true) - ```python paddle.nn.Layer.set_state_dict(state_dict, use_structured_name=True) ``` @@ -14,7 +12,6 @@ paddle.nn.Layer.set_state_dict(state_dict, use_structured_name=True) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | state_dict | state_dict | 包含所有参数和可持久性 buffers 的 dict。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.register_forward_hook.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.register_forward_hook.md index a59b67ca473..9f02069e571 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.register_forward_hook.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.register_forward_hook.md @@ -1,12 +1,10 @@ ## [ torch 参数更多 ]torch.nn.Module.register_forward_hook ### [torch.nn.Module.register_forward_hook](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.register_forward_hook) - ```python torch.nn.Module.register_forward_hook(hook, *, prepend=False, with_kwargs=False, always_call=False) ``` ### [paddle.nn.Layer.register_forward_post_hook](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#register-forward-post-hook-hook) - ```python paddle.nn.Layer.register_forward_post_hook(hook) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.register_forward_pre_hook.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.register_forward_pre_hook.md index ab88e1d1aad..9ab6e9e6cb9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.register_forward_pre_hook.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Module.register_forward_pre_hook.md @@ -1,12 +1,10 @@ ## [ torch 参数更多 ]torch.nn.Module.register_forward_pre_hook ### [torch.nn.Module.register_forward_pre_hook](https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.register_forward_pre_hook) - ```python torch.nn.Module.register_forward_pre_hook(hook, *, prepend=False, with_kwargs=False) ``` ### [paddle.nn.Layer.register_forward_pre_hook](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Layer_cn.html#register-forward-pre-hook-hook) - ```python paddle.nn.Layer.register_forward_pre_hook(hook) ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiLabelMarginLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiLabelMarginLoss.md index b3fbe6f2e86..86ec1532d99 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiLabelMarginLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiLabelMarginLoss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.MultiLabelMarginLoss - +## [ torch 参数更多 ]torch.nn.MultiLabelMarginLoss ### [torch.nn.MultiLabelMarginLoss](https://pytorch.org/docs/stable/generated/torch.nn.MultiLabelMarginLoss.html#torch.nn.MultiLabelMarginLoss) - ```python torch.nn.MultiLabelMarginLoss(size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.MultiLabelMarginLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MultiLabelMarginLoss_cn.html) - ```python paddle.nn.MultiLabelMarginLoss(reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.MultiLabelMarginLoss(reduction='mean', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------------------------------------- | | size_average | - | 已废弃,和 reduce 组合决定损失计算方式。 | @@ -23,7 +19,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiLabelSoftMarginLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiLabelSoftMarginLoss.md index 833cefa8530..83c1ecce58e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiLabelSoftMarginLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiLabelSoftMarginLoss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.MultiLabelSoftMarginLoss - +## [ torch 参数更多 ]torch.nn.MultiLabelSoftMarginLoss ### [torch.nn.MultiLabelSoftMarginLoss](https://pytorch.org/docs/stable/generated/torch.nn.MultiLabelSoftMarginLoss.html#torch.nn.MultiLabelSoftMarginLoss) - ```python torch.nn.MultiLabelSoftMarginLoss(weight=None, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.MultiLabelSoftMarginLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MultiLabelSoftMarginLoss_cn.html) - ```python paddle.nn.MultiLabelSoftMarginLoss(weight=None, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.MultiLabelSoftMarginLoss(weight=None, reduction='mean', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------------------------------------- | | weight | weight | 手动设定权重。 | @@ -24,7 +20,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiMarginLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiMarginLoss.md index aab3cc34fc0..9cbf97f6ad0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiMarginLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiMarginLoss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.MultiMarginLoss - +## [ torch 参数更多 ]torch.nn.MultiMarginLoss ### [torch.nn.MultiMarginLoss](https://pytorch.org/docs/stable/generated/torch.nn.MultiMarginLoss) - ```python torch.nn.MultiMarginLoss(p=1, margin=1.0, weight=None, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.MultiMarginLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MultiMarginLoss_cn.html) - ```python paddle.nn.MultiMarginLoss(p: int = 1, margin: float = 1.0, weight=None, reduction: str = 'mean', name: str = None) ``` @@ -15,7 +12,6 @@ paddle.nn.MultiMarginLoss(p: int = 1, margin: float = 1.0, weight=None, reductio PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------ | ------------------ | ---------------------------------------------------------------------------------- | | p | p | 手动指定幂次方指数大小,默认为 1。 | @@ -26,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式,可选值有 `none`、`mean` 和 `sum`。默认为 `mean`,计算 mini-batch loss 均值。设置为 `sum` 时,计算 mini-batch loss 的总和。设置为 `none` 时,则返回 loss Tensor。默认值下为 `mean`。 | ### 转写示例 - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiheadAttention.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiheadAttention.md index 52feb62cae1..5099caad85a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiheadAttention.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.MultiheadAttention.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.MultiheadAttention - +## [ torch 参数更多 ]torch.nn.MultiheadAttention ### [torch.nn.MultiheadAttention](https://pytorch.org/docs/stable/generated/torch.nn.MultiheadAttention.html#torch.nn.MultiheadAttention) - ```python torch.nn.MultiheadAttention(embed_dim, num_heads, dropout=0.0, bias=True, add_bias_kv=False, add_zero_attn=False, kdim=None, vdim=None, batch_first=False, device=None, dtype=None) ``` ### [paddle.nn.MultiHeadAttention](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/MultiHeadAttention_cn.html) - ```python paddle.nn.MultiHeadAttention(embed_dim, num_heads, dropout=0.0, kdim=None, vdim=None, need_weights=False, weight_attr=None, bias_attr=None) ``` @@ -15,7 +12,6 @@ paddle.nn.MultiHeadAttention(embed_dim, num_heads, dropout=0.0, kdim=None, vdim= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------------------- | | embed_dim | embed_dim | 输入输出的维度。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.NLLLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.NLLLoss.md index 2d7d6a8278a..b3eecaaf31d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.NLLLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.NLLLoss.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.nn.NLLLoss - +## [ torch 参数更多 ]torch.nn.NLLLoss ### [torch.nn.NLLLoss](https://pytorch.org/docs/stable/generated/torch.nn.NLLLoss.html?highlight=nllloss#torch.nn.NLLLoss) - ```python torch.nn.NLLLoss(weight=None, size_average=None, @@ -11,7 +9,6 @@ torch.nn.NLLLoss(weight=None, ``` ### [paddle.nn.NLLLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/NLLLoss_cn.html#nllloss) - ```python paddle.nn.NLLLoss(weight=None, ignore_index=- 100, @@ -22,7 +19,6 @@ paddle.nn.NLLLoss(weight=None, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -------------------------------------------- | | weight | weight | 表示每个类别的权重。 | @@ -42,7 +38,6 @@ paddle.nn.NLLLoss(reduction='mean') ``` #### size_average - size_average 为 True ```python @@ -64,7 +59,6 @@ paddle.nn.NLLLoss(weight=w, reduction='sum') ``` #### reduce - reduce 为 True ```python @@ -86,7 +80,6 @@ paddle.nn.NLLLoss(weight=w, reduction='none') ``` #### reduction - reduction 为'none' ```python diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.PReLU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.PReLU.md index a3378c3cf26..c2d3682f6b7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.PReLU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.PReLU.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.PReLU ### [torch.nn.PReLU](https://pytorch.org/docs/stable/generated/torch.nn.PReLU.html?highlight=prelu#torch.nn.PReLU) - ```python torch.nn.PReLU(num_parameters=1, init=0.25, @@ -9,7 +8,6 @@ torch.nn.PReLU(num_parameters=1, ``` ### [paddle.nn.PReLU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/PReLU_cn.html#prelu) - ```python paddle.nn.PReLU(num_parameters=1, init=0.25, @@ -20,7 +18,6 @@ paddle.nn.PReLU(num_parameters=1, 其中 PyTorch 与 Paddle 均支持更多其它参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | num_parameters | num_parameters | 表示可训练 `weight` 的数量。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.PoissonNLLLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.PoissonNLLLoss.md index a6cf52fc9d4..feb4a440e49 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.PoissonNLLLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.PoissonNLLLoss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.PoissonNLLLoss - +## [ torch 参数更多 ]torch.nn.PoissonNLLLoss ### [torch.nn.PoissonNLLLoss](https://pytorch.org/docs/stable/generated/torch.nn.PoissonNLLLoss) - ```python torch.nn.PoissonNLLLoss(log_input=True, full=False, size_average=None, eps=1e-08, reduce=None, reduction='mean') ``` ### [paddle.nn.PoissonNLLLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/PoissonNLLLoss_cn.html) - ```python paddle.nn.PoissonNLLLoss(log_input=True, full=False, epsilon=1e-8, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.PoissonNLLLoss(log_input=True, full=False, epsilon=1e-8, reduction='me PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------ | ------------------ | ---------------------------------------------------------------------------------- | | log_input | log_input | 输入是否为对数函数映射后结果。 | @@ -26,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式,可选值有 `none`、`mean` 和 `sum`。默认为 `mean`,计算 mini-batch loss 均值。设置为 `sum` 时,计算 mini-batch loss 的总和。设置为 `none` 时,则返回 loss Tensor。默认值下为 `mean`。两者完全一致。 | ### 转写示例 - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.RNNBase.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.RNNBase.md index d4e45375bdf..444bf2c0794 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.RNNBase.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.RNNBase.md @@ -1,4 +1,4 @@ -## [torch 参数更多] torch.nn.RNNBase +## [ torch 参数更多 ]torch.nn.RNNBase ### [torch.nn.RNNBase](https://pytorch.org/docs/stable/generated/torch.nn.RNNBase.html#torch.nn.RNNBase) ```python torch.nn.RNNBase(mode: str, input_size: int, hidden_size: int, @@ -17,7 +17,6 @@ paddle.nn.layer.rnn.RNNBase(mode, input_size, hidden_size, 两者功能一致但参数不一致,部分参数名不同,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | mode | mode | 表示 `RNN` 模型的类型, 取值为 `'LSTM', 'GRU', 'RNN_TANH', 'RNN_RELU`,参数完全一致。| @@ -34,7 +33,6 @@ paddle.nn.layer.rnn.RNNBase(mode, input_size, hidden_size, ### 转写示例 - #### bias:是否使用偏置 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.RReLU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.RReLU.md index 0b09a4a4bf5..0818033a1ca 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.RReLU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.RReLU.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.RReLU - +## [ torch 参数更多 ]torch.nn.RReLU ### [torch.nn.RReLU](https://pytorch.org/docs/stable/generated/torch.nn.RReLU.html#torch.nn.RReLU) - ```python torch.nn.RReLU(lower=0.125, upper=0.3333333333333333, inplace=False) ``` ### [paddle.nn.RReLU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/RReLU_cn.html) - ```python paddle.nn.RReLU(lower=1. / 8., upper=1. / 3., name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.RReLU(lower=1. / 8., upper=1. / 3., name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | lower | lower | 负值斜率的随机值范围下限。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ReLU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ReLU.md index e5269402202..378f4e52def 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ReLU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ReLU.md @@ -1,19 +1,16 @@ -## [torch 参数更多 ]torch.nn.ReLU +## [ torch 参数更多 ]torch.nn.ReLU ### [torch.nn.ReLU](https://pytorch.org/docs/stable/generated/torch.nn.ReLU.html?highlight=relu#torch.nn.ReLU) - ```python torch.nn.ReLU(inplace=False) ``` ### [paddle.nn.ReLU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/ReLU_cn.html#relu) - ```python paddle.nn.ReLU(name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | inplace | - | 在不更改变量的内存地址的情况下,直接修改变量的值,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ReLU6.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ReLU6.md index 08d0664e273..4960e25056c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ReLU6.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.ReLU6.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.ReLU6 - +## [ torch 参数更多 ]torch.nn.ReLU6 ### [torch.nn.ReLU6](https://pytorch.org/docs/stable/generated/torch.nn.ReLU6.html#torch.nn.ReLU6) - ```python torch.nn.ReLU6(inplace=False) ``` ### [paddle.nn.ReLU6](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/ReLU6_cn.html) - ```python paddle.nn.ReLU6(name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.ReLU6(name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | inplace | - | 表示在不更改变量的内存地址的情况下,直接修改变量的值,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SELU.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SELU.md index eb7112d8754..b44358ef666 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SELU.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SELU.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.SELU - +## [ torch 参数更多 ]torch.nn.SELU ### [torch.nn.SELU](https://pytorch.org/docs/stable/generated/torch.nn.SELU.html#torch.nn.SELU) - ```python torch.nn.SELU(inplace=False) ``` ### [paddle.nn.SELU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/SELU_cn.html) - ```python paddle.nn.SELU(scale=1.0507009873554804934193349852946, alpha=1.6732632423543772848170429916717, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.SELU(scale=1.0507009873554804934193349852946, alpha=1.6732632423543772 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | inplace | - | 表示在不更改变量的内存地址的情况下,直接修改变量的值,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SmoothL1Loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SmoothL1Loss.md index 2510d977cc6..28ea68cc80b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SmoothL1Loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SmoothL1Loss.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.nn.SmoothL1Loss +## [ torch 参数更多 ]torch.nn.SmoothL1Loss ### [torch.nn.SmoothL1Loss](https://pytorch.org/docs/stable/generated/torch.nn.SmoothL1Loss.html?highlight=smoothl1loss#torch.nn.SmoothL1Loss) - ```python torch.nn.SmoothL1Loss(size_average=None, reduce=None, @@ -9,7 +8,6 @@ torch.nn.SmoothL1Loss(size_average=None, ``` ### [paddle.nn.SmoothL1Loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/SmoothL1Loss_cn.html#smoothl1loss) - ```python paddle.nn.SmoothL1Loss(reduction='mean', delta=1.0, @@ -19,7 +17,6 @@ paddle.nn.SmoothL1Loss(reduction='mean', PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | size_average | - | PyTorch 已弃用, Paddle 无此参数,需要转写。 | @@ -38,8 +35,7 @@ torch.nn.SmoothL1Loss(size_average=True) paddle.nn.SmoothL1Loss(reduction='mean') ``` -#### size_average -size_average 为 True +#### size_averagesize_average 为 True ```python # PyTorch 写法 torch.nn.SmoothL1Loss(size_average=True) @@ -57,8 +53,7 @@ torch.nn.SmoothL1Loss(size_average=False) paddle.nn.SmoothL1Loss(reduction='sum') ``` -#### reduce -reduce 为 True +#### reducereduce 为 True ```python # PyTorch 写法 torch.nn.SmoothL1Loss(reduce=True) @@ -76,8 +71,7 @@ torch.nn.SmoothL1Loss(reduce=False) paddle.nn.SmoothL1Loss(reduction='none') ``` -#### reduction -reduction 为'none' +#### reductionreduction 为'none' ```python # PyTorch 写法 torch.nn.SmoothL1Loss(reduction='none') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SoftMarginLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SoftMarginLoss.md index b98c9b29afa..a85001ee96f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SoftMarginLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SoftMarginLoss.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.nn.SoftMarginLoss - +## [ torch 参数更多 ]torch.nn.SoftMarginLoss ### [torch.nn.SoftMarginLoss](https://pytorch.org/docs/stable/generated/torch.nn.SoftMarginLoss.html#torch.nn.SoftMarginLoss) - ```python torch.nn.SoftMarginLoss(size_average=None, reduce=None, @@ -9,7 +7,6 @@ torch.nn.SoftMarginLoss(size_average=None, ``` ### [paddle.nn.SoftMarginLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/SoftMarginLoss_cn.html#softmarginloss) - ```python paddle.nn.SoftMarginLoss(reduction='mean', name=None) @@ -18,7 +15,6 @@ paddle.nn.SoftMarginLoss(reduction='mean', PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -------------------------------------------- | | size_average | - | PyTorch 已弃用, Paddle 无此参数,需要转写。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 表示应用于输出结果的计算方式。 | ### 转写示例 - #### size_average - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SyncBatchNorm.convert_sync_batchnorm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SyncBatchNorm.convert_sync_batchnorm.md index 4a04a7da378..3731d8711ab 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SyncBatchNorm.convert_sync_batchnorm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.SyncBatchNorm.convert_sync_batchnorm.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.nn.SyncBatchNorm.convert_sync_batchnorm ### [torch.nn.SyncBatchNorm.convert_sync_batchnorm](https://pytorch.org/docs/stable/generated/torch.nn.SyncBatchNorm.html?highlight=convert_sync_batchnorm#torch.nn.SyncBatchNorm.convert_sync_batchnorm) - ```python torch.nn.SyncBatchNorm.convert_sync_batchnorm(module, process_group=None) ``` ### [paddle.nn.SyncBatchNorm.convert_sync_batchnorm](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/SyncBatchNorm_cn.html#convert-sync-batchnorm-layer) - ```python paddle.nn.SyncBatchNorm.convert_sync_batchnorm(layer) ``` PyTorch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | module | layer | 需要转换的模型层, 仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Threshold.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Threshold.md index 1d22fddc8d7..12cd8a7e772 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Threshold.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Threshold.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.Threshold - +## [ torch 参数更多 ]torch.nn.Threshold ### [torch.nn.Threshold](https://pytorch.org/docs/stable/generated/torch.nn.Threshold.html#torch.nn.Threshold) - ```python torch.nn.Threshold(threshold, value, inplace=False) ``` ### [paddle.nn.ThresholdedReLU](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/ThresholdedReLU_cn.html) - ```python paddle.nn.ThresholdedReLU(threshold=1.0, value=0.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.ThresholdedReLU(threshold=1.0, value=0.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | threshold | threshold | ThresholdedReLU 激活计算公式中的 threshold 值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Transformer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Transformer.md index b3fa7545edb..c8a618f6a6a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Transformer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.Transformer.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.Transformer - +## [ torch 参数更多 ]torch.nn.Transformer ### [torch.nn.Transformer](https://pytorch.org/docs/stable/generated/torch.nn.Transformer.html#torch.nn.Transformer) - ```python torch.nn.Transformer(d_model=512, nhead=8, num_encoder_layers=6, num_decoder_layers=6, dim_feedforward=2048, dropout=0.1, activation=, custom_encoder=None, custom_decoder=None, layer_norm_eps=1e-05, batch_first=False, norm_first=False, bias=True, device=None, dtype=None) ``` ### [paddle.nn.Transformer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/Transformer_cn.html) - ```python paddle.nn.Transformer(d_model=512, nhead=8, num_encoder_layers=6, num_decoder_layers=6, dim_feedforward=2048, dropout=0.1, activation='relu', attn_dropout=None, act_dropout=None, normalize_before=False, weight_attr=None, bias_attr=None, custom_encoder=None, custom_decoder=None) ``` @@ -15,7 +12,6 @@ paddle.nn.Transformer(d_model=512, nhead=8, num_encoder_layers=6, num_decoder_la PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------ | ------------------ | ----------------------------------------------------------------------------------- | | d_model | d_model | 编码器和解码器的输入输出的维度。 | @@ -39,9 +35,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - #### device:Tensor 的设备 - ```python # PyTorch 写法 m = torch.nn.Transformer(device=torch.device('cpu')) @@ -53,7 +47,6 @@ y = m(x).cpu() ``` #### dtype:Tensor 的数据类型 - ```python # PyTorch 写法 m = torch.nn.Transformer(dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerDecoderLayer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerDecoderLayer.md index 190c2f268e2..a3f39352460 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerDecoderLayer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerDecoderLayer.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.TransformerDecoderLayer ### [torch.nn.TransformerDecoderLayer](https://pytorch.org/docs/stable/generated/torch.nn.TransformerDecoderLayer.html?highlight=transformerdecoderlayer#torch.nn.TransformerDecoderLayer) - ```python torch.nn.TransformerDecoderLayer(d_model, nhead, @@ -15,7 +14,6 @@ torch.nn.TransformerDecoderLayer(d_model, dtype=None) ``` ### [paddle.nn.TransformerDecoderLayer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/TransformerDecoderLayer_cn.html#transformerdecoderlayer) - ```python paddle.nn.TransformerDecoderLayer(d_model, nhead, @@ -32,7 +30,6 @@ paddle.nn.TransformerDecoderLayer(d_model, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | d_model | d_model | 表示输入的维度。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerEncoder.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerEncoder.md index c937cce039a..d7c4d132190 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerEncoder.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerEncoder.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.TransformerEncoder - +## [ torch 参数更多 ]torch.nn.TransformerEncoder ### [torch.nn.TransformerEncoder](https://pytorch.org/docs/stable/generated/torch.nn.TransformerEncoder.html#torch.nn.TransformerEncoder) - ```python torch.nn.TransformerEncoder(encoder_layer, num_layers, norm=None, enable_nested_tensor=True, mask_check=True) ``` ### [paddle.nn.TransformerEncoder](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/TransformerEncoder_cn.html) - ```python paddle.nn.TransformerEncoder(encoder_layer, num_layers, norm=None) ``` @@ -15,7 +12,6 @@ paddle.nn.TransformerEncoder(encoder_layer, num_layers, norm=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------------- | ------------- | ------------------------------------------ | | encoder_layer | encoder_layer | TransformerEncoderLayer 的一个实例。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerEncoderLayer.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerEncoderLayer.md index 28712c6a4ca..265bf25623a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerEncoderLayer.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TransformerEncoderLayer.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.TransformerEncoderLayer - +## [ torch 参数更多 ]torch.nn.TransformerEncoderLayer ### [torch.nn.TransformerEncoderLayer](https://pytorch.org/docs/stable/generated/torch.nn.TransformerEncoderLayer.html#torch.nn.TransformerEncoderLayer) - ```python torch.nn.TransformerEncoderLayer(d_model, nhead, dim_feedforward=2048, dropout=0.1, activation=, layer_norm_eps=1e-05, batch_first=False, norm_first=False, bias=True, device=None, dtype=None) ``` ### [paddle.nn.TransformerEncoderLayer](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/TransformerEncoderLayer_cn.html) - ```python paddle.nn.TransformerEncoderLayer(d_model, nhead, dim_feedforward, dropout=0.1, activation='relu', attn_dropout=None, act_dropout=None, normalize_before=False, weight_attr=None, bias_attr=None, layer_norm_eps=1e-05) ``` @@ -15,7 +12,6 @@ paddle.nn.TransformerEncoderLayer(d_model, nhead, dim_feedforward, dropout=0.1, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------------- | ---------------- | ----------------------------------------------------------------------------------- | | d_model | d_model | 输入输出的维度。 | @@ -34,9 +30,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | weight_attr | 指定权重参数属性的对象,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### device:Tensor 的设备 - ```python # PyTorch 写法 m = torch.nn.TransformerEncoderLayer(d_model, nhead, dim_feedforward,device=torch.device('cpu')) @@ -48,7 +42,6 @@ y = m(x).cpu() ``` #### dtype:Tensor 的数据类型 - ```python # PyTorch 写法 m = torch.nn.TransformerEncoderLayer(d_model, nhead, dim_feedforward,dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TripletMarginLoss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TripletMarginLoss.md index 0b91b6a6975..8b34714344f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TripletMarginLoss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.TripletMarginLoss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.TripletMarginLoss - +## [ torch 参数更多 ]torch.nn.TripletMarginLoss ### [torch.nn.TripletMarginLoss](https://pytorch.org/docs/stable/generated/torch.nn.TripletMarginLoss.html#torch.nn.TripletMarginLoss) - ```python torch.nn.TripletMarginLoss(margin=1.0, p=2.0, eps=1e-06, swap=False, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.TripletMarginLoss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/TripletMarginLoss_cn.html) - ```python paddle.nn.TripletMarginLoss(margin=1.0, p=2., epsilon=1e-6, swap=False, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.TripletMarginLoss(margin=1.0, p=2., epsilon=1e-6, swap=False, reductio PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------------------------------------- | | margin | margin | 手动指定间距。 | @@ -27,7 +23,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.alpha_dropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.alpha_dropout.md index eff8a4be8d2..2e450c374b9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.alpha_dropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.alpha_dropout.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.alpha_dropout - ### [torch.nn.functional.alpha\_dropout](https://pytorch.org/docs/stable/generated/torch.nn.functional.alpha_dropout.html) - ```python torch.nn.functional.alpha_dropout(input, p=0.5, training=False, inplace=False) ``` ### [paddle.nn.functional.alpha\_dropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/alpha_dropout_cn.html#alpha-dropout) - ```python paddle.nn.functional.alpha_dropout(x, p=0.5, training=True, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.alpha_dropout(x, p=0.5, training=True, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -- | | input | x | 输入的多维 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.binary_cross_entropy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.binary_cross_entropy.md index 9416b07e298..4d910bd35b7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.binary_cross_entropy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.binary_cross_entropy.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.binary_cross_entropy - ### [torch.nn.functional.binary\_cross\_entropy](https://pytorch.org/docs/stable/generated/torch.nn.functional.binary_cross_entropy.html) - ```python torch.nn.functional.binary_cross_entropy(input, target, weight=None, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.functional.binary\_cross\_entropy](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/binary_cross_entropy_cn.html#binary-cross-entropy) - ```python paddle.nn.functional.binary_cross_entropy(input, label, weight=None, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.binary_cross_entropy(input, label, weight=None, reduction=' 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -- | | input | input | 输入 Tensor。 | @@ -26,7 +22,6 @@ paddle.nn.functional.binary_cross_entropy(input, label, weight=None, reduction=' | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - #### size_average、reduce ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.binary_cross_entropy_with_logits.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.binary_cross_entropy_with_logits.md index 808caa2f9b2..40fc6c2c2c0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.binary_cross_entropy_with_logits.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.binary_cross_entropy_with_logits.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.binary_cross_entropy_with_logits - +## [ torch 参数更多 ]torch.nn.functional.binary_cross_entropy_with_logits ### [torch.nn.functional.binary_cross_entropy_with_logits](https://pytorch.org/docs/stable/generated/torch.nn.functional.binary_cross_entropy_with_logits.html?highlight=binary_cross_entropy_with_logits#torch.nn.functional.binary_cross_entropy_with_logits) - ```python torch.nn.functional.binary_cross_entropy_with_logits(input, target, weight=None, size_average=None, reduce=None, reduction='mean', pos_weight=None) ``` ### [paddle.nn.functional.binary_cross_entropy_with_logits](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/binary_cross_entropy_with_logits_cn.html) - ```python paddle.nn.functional.binary_cross_entropy_with_logits(logit, label, weight=None, reduction='mean', pos_weight=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.binary_cross_entropy_with_logits(logit, label, weight=None, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | logit | 表示输入的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.celu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.celu.md index e746f0444ce..dce9418a005 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.celu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.celu.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.celu - +## [ torch 参数更多 ]torch.nn.functional.celu ### [torch.nn.functional.celu](https://pytorch.org/docs/stable/generated/torch.nn.functional.celu.html#torch.nn.functional.celu) - ```python torch.nn.functional.celu(input, alpha=1.0, inplace=False) ``` ### [paddle.nn.functional.celu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/celu_cn.html) - ```python paddle.nn.functional.celu(x, alpha=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.celu(x, alpha=1.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.cosine_embedding_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.cosine_embedding_loss.md index 4b3d8f6e68c..9d9909e535c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.cosine_embedding_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.cosine_embedding_loss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.cosine_embedding_loss - +## [ torch 参数更多 ]torch.nn.functional.cosine_embedding_loss ### [torch.nn.functional.cosine_embedding_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.cosine_embedding_loss.html#torch.nn.functional.cosine_embedding_loss) - ```python torch.nn.functional.cosine_embedding_loss(input1, input2, target, margin=0, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.functional.cosine_embedding_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/cosine_embedding_loss_cn.html) - ```python paddle.nn.functional.cosine_embedding_loss(input1, input2, label, margin=0, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.cosine_embedding_loss(input1, input2, label, margin=0, redu PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------------------------------------- | | input1 | input1 | 输入的 Tensor。 | @@ -27,7 +23,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.cross_entropy.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.cross_entropy.md index 363e5950b9c..015cb1995b9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.cross_entropy.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.cross_entropy.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.nn.functional.cross_entropy - ### [torch.nn.functional.cross_entropy](https://pytorch.org/docs/stable/generated/torch.nn.functional.cross_entropy.html?highlight=cross_#torch.nn.functional.cross_entropy) - ```python torch.nn.functional.cross_entropy(input, target, @@ -14,7 +12,6 @@ torch.nn.functional.cross_entropy(input, ``` ### [paddle.nn.functional.cross_entropy](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/cross_entropy_cn.html) - ```python paddle.nn.functional.cross_entropy(input, label, @@ -30,7 +27,6 @@ paddle.nn.functional.cross_entropy(input, 两者功能一致,torch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input | 表示预测的 Tensor 。 | @@ -47,7 +43,6 @@ paddle.nn.functional.cross_entropy(input, ### 转写示例 #### size_average - size_average 为 True ```python @@ -69,7 +64,6 @@ paddle.nn.functional.cross_entropy(x,y,reduction='sum') ``` #### reduce - reduce 为 True ```python @@ -91,7 +85,6 @@ paddle.nn.BCEWithLogitsLoss(reduction='none') ``` #### reduction - reduction 为'none' ```python diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.ctc_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.ctc_loss.md index 393975a9891..96d212aa244 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.ctc_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.ctc_loss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.ctc_loss - +## [ torch 参数更多 ]torch.nn.functional.ctc_loss ### [torch.nn.functional.ctc_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.ctc_loss.html#torch.nn.functional.ctc_loss) - ```python torch.nn.functional.ctc_loss(log_probs, targets, input_lengths, target_lengths, blank=0, reduction='mean', zero_infinity=False) ``` ### [paddle.nn.functional.ctc_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/ctc_loss_cn.html) - ```python paddle.nn.functional.ctc_loss(log_probs, labels, input_lengths, label_lengths, blank=0, reduction='mean') ``` @@ -15,7 +12,6 @@ paddle.nn.functional.ctc_loss(log_probs, labels, input_lengths, label_lengths, b 其中 torch 的 log_softmax+ctc_loss 相当于 paddle 的 ctc_loss,是一个二对一的情况,暂时无法转写。PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------- | ------------------------------------------------------------------ | | log_probs | log_probs | 经过 padding 的概率序列。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout.md index b527971fc4b..4091af3c318 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.dropout - ### [torch.nn.functional.dropout](https://pytorch.org/docs/stable/generated/torch.nn.functional.dropout.html) - ```python torch.nn.functional.dropout(input, p=0.5, training=True, inplace=False) ``` ### [paddle.nn.functional.dropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/dropout_cn.html#dropout) - ```python paddle.nn.functional.dropout(x, p=0.5, axis=None, training=True, mode='upscale_in_train', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.dropout(x, p=0.5, axis=None, training=True, mode='upscale_i 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -- | | input | x | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout2d.md index 5f23ba933f8..1acdf33f13f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout2d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.dropout2d - ### [torch.nn.functional.dropout2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.dropout2d.html#torch.nn.functional.dropout2d) - ```python torch.nn.functional.dropout2d(input, p=0.5, training=True, inplace=False) ``` ### [paddle.nn.functional.dropout2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/dropout2d_cn.html) - ```python paddle.nn.functional.dropout2d(x, p=0.5, training=True, data_format='NCHW', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.dropout2d(x, p=0.5, training=True, data_format='NCHW', name PyTorch 对于 dropout1d/dropout2d/dropout3d,是将某个 Channel 以一定概率全部置 0,Paddle 是所有元素以一定概率置 0,但该差异一般不影响网络训练效果。 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的多维 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout3d.md index 805fc096ff7..229e96ae88d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.dropout3d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.dropout3d - ### [torch.nn.functional.dropout3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.dropout3d.html#torch.nn.functional.dropout3d) - ```python torch.nn.functional.dropout3d(input, p=0.5, training=True, inplace=False) ``` ### [paddle.nn.functional.dropout3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/dropout3d_cn.html) - ```python paddle.nn.functional.dropout3d(x, p=0.5, training=True, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.dropout3d(x, p=0.5, training=True, name=None) PyTorch 对于 dropout1d/dropout2d/dropout3d,是将某个 Channel 以一定概率全部置 0,Paddle 是所有元素以一定概率置 0,但该差异一般不影响网络训练效果。 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的多维 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.elu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.elu.md index 4350edd0d13..f9d38d0b331 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.elu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.elu.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.elu - +## [ torch 参数更多 ]torch.nn.functional.elu ### [torch.nn.functional.elu](https://pytorch.org/docs/stable/generated/torch.nn.functional.elu.html#torch.nn.functional.elu) - ```python torch.nn.functional.elu(input, alpha=1.0, inplace=False) ``` ### [paddle.nn.functional.elu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/elu_cn.html) - ```python paddle.nn.functional.elu(x, alpha=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.elu(x, alpha=1.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.feature_alpha_dropout.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.feature_alpha_dropout.md index 8a2d773f4e1..40b5468a6d0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.feature_alpha_dropout.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.feature_alpha_dropout.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.feature_alpha_dropout - ### [torch.nn.functional.feature\_alpha\_dropout](https://pytorch.org/docs/stable/generated/torch.nn.functional.feature_alpha_dropout.html) - ```python torch.nn.functional.feature_alpha_dropout(input, p=0.5, training=False, inplace=False) ``` ### [paddle.nn.functional.feature\_alpha\_dropout](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/feature_alpha_dropout_cn.html#feature_alpha-dropout) - ```python paddle.nn.functional.feature_alpha_dropout(x, p=0.5, training=True, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.feature_alpha_dropout(x, p=0.5, training=True, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | -- | | input | x | 输入的多维 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.fractional_max_pool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.fractional_max_pool2d.md index ac8cb44ea6f..dc83d5992ed 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.fractional_max_pool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.fractional_max_pool2d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.fractional_max_pool2d - ### [torch.nn.functional.fractional_max_pool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.fractional_max_pool2d.html#torch-nn-functional-fractional-max-pool2d) - ```python torch.nn.functional.fractional_max_pool2d(input, kernel_size, output_size=None, output_ratio=None, return_indices=False, _random_samples=None) ``` ### [paddle.nn.functional.fractional_max_pool2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/fractional_max_pool2d_cn.html) - ```python paddle.nn.functional.fractional_max_pool2d(x, output_size, kernel_size=None, random_u=None, return_mask=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.fractional_max_pool2d(x, output_size, kernel_size=None, ran PyTorch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。仅参数名不一致。 | @@ -26,9 +22,7 @@ PyTorch 参数更多,具体如下: | _random_samples | random_u | 表示随机数。PyTorch 以列表形式的 Tensor 方式传入,Paddle 以 float 的方式传入,如果 PyTorch 的多个随机数相同,需要转写,如果 PyTorch 的多个随机数不同,暂无转写方式。 | ### 转写示例 - #### output_ratio:目标输出比例 - ```python # 假设 intput 的 with=7, height=7, # output_ratio = 0.75, 则目标 output 的 width = int(7*0.75) = 5, height = int(7*0.75) = 5 @@ -40,7 +34,6 @@ paddle.nn.functional.fractional_max_pool2d(x, output_size=[5, 5], kernel_size=2, ``` #### _random_samples:随机数 - ```python # Pytorch 写法 torch.nn.functional.fractional_max_pool2d(input, 2, output_size=[3, 3], return_indices=True, _random_samples=torch.tensor([[[0.3, 0.3]]])) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.fractional_max_pool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.fractional_max_pool3d.md index 5fcc4fe75db..fba785b5a92 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.fractional_max_pool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.fractional_max_pool3d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.fractional_max_pool3d - ### [torch.nn.functional.fractional_max_pool3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.fractional_max_pool3d.html#torch-nn-functional-fractional-max-pool3d) - ```python torch.nn.functional.fractional_max_pool3d(input, kernel_size, output_size=None, output_ratio=None, return_indices=False, _random_samples=None) ``` ### [paddle.nn.functional.fractional_max_pool3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/fractional_max_pool3d_cn.html) - ```python paddle.nn.functional.fractional_max_pool3d(x, output_size, kernel_size=None, random_u=None, return_mask=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.fractional_max_pool3d(x, output_size, kernel_size=None, ran PyTorch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor 。仅参数名不一致。 | @@ -26,9 +22,7 @@ PyTorch 参数更多,具体如下: | _random_samples | random_u | 表示随机数。PyTorch 以列表形式的 Tensor 方式传入,Paddle 以 float 的方式传入,如果 PyTorch 的多个随机数相同,需要转写,如果 PyTorch 的多个随机数不同,暂无转写方式。 | ### 转写示例 - #### output_ratio:目标输出比例 - ```python # 假设 intput 的 depth=7, with=7, height=7, # output_ratio = 0.75, 则目标 output 的 depth = int(7*0.75) = 5, width = int(7*0.75) = 5, height = int(7*0.75) = 5 @@ -40,7 +34,6 @@ paddle.nn.functional.fractional_max_pool3d(x, output_size=[5, 5, 5], kernel_size ``` #### _random_samples:随机数 - ```python # Pytorch 写法 torch.nn.functional.fractional_max_pool3d(input, 2, output_size=[3, 3, 3], return_indices=True, _random_samples=torch.tensor([[[0.3, 0.3, 0.3]]])) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.gumbel_softmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.gumbel_softmax.md index b7828d74e20..ae7d44efbfa 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.gumbel_softmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.gumbel_softmax.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.gumbel_softmax - +## [ torch 参数更多 ]torch.nn.functional.gumbel_softmax ### [torch.nn.functional.gumbel_softmax](https://pytorch.org/docs/stable/generated/torch.nn.functional.gumbel_softmax.html#torch.nn.functional.gumbel_softmax) - ```python torch.nn.functional.gumbel_softmax(logits, tau=1, hard=False, eps=1e-10, dim=- 1) ``` ### [paddle.nn.functional.gumbel_softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/gumbel_softmax_cn.html) - ```python paddle.nn.functional.gumbel_softmax(x, temperature=1.0, hard=False, axis=- 1, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.gumbel_softmax(x, temperature=1.0, hard=False, axis=- 1, na PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ------------------------------------------------------------------------------------------------- | | logits | x | 一个 N-D Tensor,前 N-1 维用于独立分布 batch 的索引,最后一维表示每个类别的概率,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hardswish.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hardswish.md index 405fb9c5132..51acb6a5b0c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hardswish.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hardswish.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.hardswish - +## [ torch 参数更多 ]torch.nn.functional.hardswish ### [torch.nn.functional.hardswish](https://pytorch.org/docs/stable/generated/torch.nn.functional.hardswish.html#torch.nn.functional.hardswish) - ```python torch.nn.functional.hardswish(input, inplace=False) ``` ### [paddle.nn.functional.hardswish](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/hardswish_cn.html) - ```python paddle.nn.functional.hardswish(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.hardswish(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hardtanh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hardtanh.md index 97c64e6c0b2..7e6ef261d1c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hardtanh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hardtanh.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.hardtanh - +## [ torch 参数更多 ]torch.nn.functional.hardtanh ### [torch.nn.functional.hardtanh](https://pytorch.org/docs/stable/generated/torch.nn.functional.hardtanh.html#torch.nn.functional.hardtanh) - ```python torch.nn.functional.hardtanh(input, min_val=- 1.0, max_val=1.0, inplace=False) ``` ### [paddle.nn.functional.hardtanh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/hardtanh_cn.html) - ```python paddle.nn.functional.hardtanh(x, min=-1.0, max=1.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.hardtanh(x, min=-1.0, max=1.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hinge_embedding_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hinge_embedding_loss.md index bca40ddab34..1833f64f3c5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hinge_embedding_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.hinge_embedding_loss.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.hinge_embedding_loss - +## [ torch 参数更多 ]torch.nn.functional.hinge_embedding_loss ### [torch.nn.functional.hinge_embedding_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.hinge_embedding_loss.html#torch.nn.functional.hinge_embedding_loss) - ```python torch.nn.functional.hinge_embedding_loss(input, target, margin=1.0, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.functional.hinge_embedding_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/hinge_embedding_loss_cn.html) - ```python paddle.nn.functional.hinge_embedding_loss(input, label, margin=1.0, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.hinge_embedding_loss(input, label, margin=1.0, reduction='m PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------------------------------------------ | | input | input | 输入的 Tensor。 | @@ -26,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 if size_average is None: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.interpolate.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.interpolate.md index 32240ad7704..88e8730ce0d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.interpolate.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.interpolate.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.interpolate - +## [ torch 参数更多 ]torch.nn.functional.interpolate ### [torch.nn.functional.interpolate](https://pytorch.org/docs/stable/generated/torch.nn.functional.interpolate.html#torch.nn.functional.interpolate) - ```python torch.nn.functional.interpolate(input, size=None, scale_factor=None, mode='nearest', align_corners=None, recompute_scale_factor=None, antialias=False) ``` ### [paddle.nn.functional.interpolate](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/interpolate_cn.html) - ```python paddle.nn.functional.interpolate(x, size=None, scale_factor=None, mode='nearest', align_corners=False, align_mode=0, data_format=None, recompute_scale_factor=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.interpolate(x, size=None, scale_factor=None, mode='nearest' PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------------------- | ------------- | ------------------------------------------------------------------------------------------------------ | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.kl_div.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.kl_div.md index 239d2e29845..a1b1ae488e0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.kl_div.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.kl_div.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.nn.functional.kl_div - +## [ torch 参数更多 ]torch.nn.functional.kl_div ### [torch.nn.functional.kl_div](https://pytorch.org/docs/stable/generated/torch.nn.functional.kl_div.html?highlight=kl_div#torch.nn.functional.kl_div) - ```python torch.nn.functional.kl_div(input, target, @@ -12,7 +10,6 @@ torch.nn.functional.kl_div(input, ``` ### [paddle.nn.functional.kl_div](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/kl_div_cn.html) - ```python paddle.nn.functional.kl_div(input, label, @@ -23,7 +20,6 @@ paddle.nn.functional.kl_div(input, 其中 PyTorch 相比 Paddle 支持更多的参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | ------------------------------------------------------ | | size_average | - | PyTorch 已弃用, Paddle 无此参数,需要转写。 | @@ -32,7 +28,6 @@ paddle.nn.functional.kl_div(input, | log_target | log_target | 指定目标是否属于 log 空间。 | ### 转写示例 - #### size_average:是否对损失进行平均或求和 ```python # PyTorch 写法 (size_average 为‘True’时) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.l1_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.l1_loss.md index 21bb3e4a38b..41e935d85ff 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.l1_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.l1_loss.md @@ -1,13 +1,10 @@ -## [torch 参数更多] torch.nn.functional.l1_loss - +## [ torch 参数更多 ]torch.nn.functional.l1_loss ### [torch.nn.functional.l1_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.l1_loss.html?highlight=l1_loss#torch.nn.functional.l1_loss) - ```python torch.nn.functional.l1_loss(input, target, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.functional.l1_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/l1_loss_cn.html) - ```python paddle.nn.functional.l1_loss(input, label, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.l1_loss(input, label, reduction='mean', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input | 表示输入的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.leaky_relu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.leaky_relu.md index 6df291d9829..7fd6cd1769a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.leaky_relu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.leaky_relu.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.leaky_relu - +## [ torch 参数更多 ]torch.nn.functional.leaky_relu ### [torch.nn.functional.leaky_relu](https://pytorch.org/docs/stable/generated/torch.nn.functional.leaky_relu.html#torch.nn.functional.leaky_relu) - ```python torch.nn.functional.leaky_relu(input, negative_slope=0.01, inplace=False) ``` ### [paddle.nn.functional.leaky_relu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/leaky_relu_cn.html) - ```python paddle.nn.functional.leaky_relu(x, negative_slope=0.01, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.leaky_relu(x, negative_slope=0.01, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | -------------- | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.log_softmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.log_softmax.md index 5f55ef8df5b..40e718f52ca 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.log_softmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.log_softmax.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.log_softmax - +## [ torch 参数更多 ]torch.nn.functional.log_softmax ### [torch.nn.functional.log_softmax](https://pytorch.org/docs/stable/generated/torch.nn.functional.log_softmax.html#torch.nn.functional.log_softmax) - ```python torch.nn.functional.log_softmax(input, dim=None, _stacklevel=3, dtype=None) ``` ### [paddle.nn.functional.log_softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/log_softmax_cn.html) - ```python paddle.nn.functional.log_softmax(x, axis=- 1, dtype=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.log_softmax(x, axis=- 1, dtype=None, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.margin_ranking_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.margin_ranking_loss.md index 4ee83010b42..32b67a003e3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.margin_ranking_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.margin_ranking_loss.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.nn.functional.margin_ranking_loss - +## [ torch 参数更多 ]torch.nn.functional.margin_ranking_loss ### [torch.nn.functional.margin_ranking_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.margin_ranking_loss.html?highlight=margin_ranking_loss#torch.nn.functional.margin_ranking_loss) - ```python torch.nn.functional.margin_ranking_loss(input1, input2, @@ -13,7 +11,6 @@ torch.nn.functional.margin_ranking_loss(input1, ``` ### [paddle.nn.functional.margin_ranking_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/margin_ranking_loss_cn.html) - ```python paddle.nn.functional.margin_ranking_loss(input, other, @@ -25,7 +22,6 @@ paddle.nn.functional.margin_ranking_loss(input, 其中 PyTorch 相⽐ Paddle ⽀持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input1 | input | 表示第一个输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool1d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool1d.md index ab93b4da376..b15a4f59ffb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool1d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool1d.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.max_pool1d - +## [ torch 参数更多 ]torch.nn.functional.max_pool1d ### [torch.nn.functional.max_pool1d](https://pytorch.org/docs/stable/generated/torch.nn.functional.max_pool1d.html#torch.nn.functional.max_pool1d) - ```python torch.nn.functional.max_pool1d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False) ``` ### [paddle.nn.functional.max_pool1d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_pool1d_cn.html) - ```python paddle.nn.functional.max_pool1d(x, kernel_size, stride=None, padding=0, return_mask=False, ceil_mode=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.max_pool1d(x, kernel_size, stride=None, padding=0, return_m PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------ | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool2d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool2d.md index 8f89ce64b93..a5a8747d730 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool2d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool2d.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.max_pool2d - ### [torch.nn.functional.max_pool2d](https://pytorch.org/docs/stable/generated/torch.nn.functional.max_pool2d.html#torch.nn.functional.max_pool2d) - ```python torch.nn.functional.max_pool2d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False) ``` ### [paddle.nn.functional.max_pool2d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_pool2d_cn.html) - ```python paddle.nn.functional.max_pool2d(x, kernel_size, stride=None, padding=0, ceil_mode=False, return_mask=False, data_format='NCHW', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.max_pool2d(x, kernel_size, stride=None, padding=0, ceil_mod PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool3d.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool3d.md index 370208d4570..aba5d769cc8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool3d.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.max_pool3d.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.max_pool3d - +## [ torch 参数更多 ]torch.nn.functional.max_pool3d ### [torch.nn.functional.max_pool3d](https://pytorch.org/docs/stable/generated/torch.nn.functional.max_pool3d.html#torch.nn.functional.max_pool3d) - ```python torch.nn.functional.max_pool3d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False) ``` ### [paddle.nn.functional.max_pool3d](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/max_pool3d_cn.html) - ```python paddle.nn.functional.max_pool3d(x, kernel_size, stride=None, padding=0, ceil_mode=False, return_mask=False, data_format="NCDHW", name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.max_pool3d(x, kernel_size, stride=None, padding=0, ceil_mod PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------------- | ------------ | ------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.mish.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.mish.md index 8029a7cc3c7..a2fe468edcc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.mish.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.mish.md @@ -1,14 +1,11 @@ ## [ torch 参数更多 ]torch.nn.functional.mish - ### [torch.nn.functional.mish](https://pytorch.org/docs/stable/generated/torch.nn.functional.mish.html?highlight=torch+nn+functional+mish#torch.nn.functional.mish) - ```python torch.nn.functional.mish(input, inplace=False) ``` ### [paddle.nn.functional.mish](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/mish_cn.html) - ```python paddle.nn.functional.mish(x, name=None) @@ -16,7 +13,6 @@ paddle.nn.functional.mish(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.mse_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.mse_loss.md index 4b5351ba1d7..1179ddf8dce 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.mse_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.mse_loss.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.nn.functional.mse_loss - ### [torch.nn.functional.mse_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.mse_loss.html?highlight=mse_loss#torch.nn.functional.mse_loss) - ```python torch.nn.functional.mse_loss(input, target, @@ -11,7 +9,6 @@ torch.nn.functional.mse_loss(input, ``` ### [paddle.nn.functional.mse_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/mse_loss_cn.html) - ```python paddle.nn.functional.mse_loss(input, label, @@ -21,7 +18,6 @@ paddle.nn.functional.mse_loss(input, 其中 PyTorch 相⽐ Paddle ⽀持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input | 表示预测的 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multi_margin_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multi_margin_loss.md index d2a370a9917..65fb4a30833 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multi_margin_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multi_margin_loss.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.multi_margin_loss - ### [torch.nn.functional.multi\_margin\_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.multi_margin_loss.html) - ```python torch.nn.functional.multi_margin_loss(input, target, p=1, margin=1, weight=None, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.functional.multi\_margin\_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/multi_margin_loss_cn.html#multi-margin-loss) - ```python paddle.nn.functional.multi_margin_loss(input, label, p=1, margin=1.0, weight=None, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.multi_margin_loss(input, label, p=1, margin=1.0, weight=Non PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -- | | input | input | 输入 Tensor。 | @@ -28,7 +24,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - #### size_average、reduce ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multilabel_margin_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multilabel_margin_loss.md index bbb72da9eae..93ce3e66d16 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multilabel_margin_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multilabel_margin_loss.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.multilabel_margin_loss - ### [torch.nn.functional.multilabel\_margin\_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.multilabel_margin_loss.html) - ```python torch.nn.functional.multilabel_margin_loss(input, target, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.functional.multi\_label\_margin\_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/multi_label_margin_loss_cn.html#multi-label-margin-loss) - ```python paddle.nn.functional.multi_label_margin_loss(input, label, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.multi_label_margin_loss(input, label, reduction='mean', nam PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -- | | input | input | 输入 Tensor。 | @@ -25,7 +21,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - #### size_average、reduce ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multilabel_soft_margin_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multilabel_soft_margin_loss.md index 57889db47ad..4dc9c9b58c5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multilabel_soft_margin_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.multilabel_soft_margin_loss.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.multilabel_soft_margin_loss - ### [torch.nn.functional.multilabel\_soft\_margin\_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.multilabel_soft_margin_loss.html) - ```python torch.nn.functional.multilabel_soft_margin_loss(input, target, weight=None, size_average=None, reduce=None, reduction='mean') ``` ### [paddle.nn.functional.multi\_label\_soft\_margin\_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/multi_label_soft_margin_loss_cn.html#multi-label-soft-margin-loss) - ```python paddle.nn.functional.multi_label_soft_margin_loss(input, label, weight=None, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.multi_label_soft_margin_loss(input, label, weight=None, red PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -- | | input | input | 输入 Tensor。 | @@ -26,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - #### size_average、reduce ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.nll_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.nll_loss.md index eb4b63288bc..6088ab784cc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.nll_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.nll_loss.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.nn.functional.nll_loss - ### [torch.nn.functional.nll_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.nll_loss.html#torch-nn-functional-nll-loss) - ```python torch.nn.functional.nll_loss(input, target, @@ -13,7 +11,6 @@ torch.nn.functional.nll_loss(input, ``` ### [paddle.nn.functional.nll_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/nll_loss_cn.html#nll-loss) - ```python paddle.nn.functional.nll_loss(input, label, @@ -25,7 +22,6 @@ paddle.nn.functional.nll_loss(input, 其中 PyTorch 相⽐ Paddle ⽀持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input | 输入 Tensor | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.normalize.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.normalize.md index 968daae3797..6f13abe80d1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.normalize.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.normalize.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.nn.functional.normalize - +## [ torch 参数更多 ]torch.nn.functional.normalize ### [torch.nn.functional.normalize](https://pytorch.org/docs/stable/generated/torch.nn.functional.normalize.html?highlight=normalize#torch.nn.functional.normalize) - ```python torch.nn.functional.normalize(input, p=2.0, @@ -11,7 +9,6 @@ torch.nn.functional.normalize(input, ``` ### [paddle.nn.functional.normalize](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/normalize_cn.html) - ```python paddle.nn.functional.normalize(x, p=2, @@ -22,7 +19,6 @@ paddle.nn.functional.normalize(x, 其中 PyTorch 相⽐ Paddle ⽀持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输出 Tensor 的 size 。 | @@ -32,7 +28,7 @@ paddle.nn.functional.normalize(x, | out | - | 表示输出 Tensor 。 | ### 转写示例 -#### out: 指定输出 +#### out: 指定输出 ```python # PyTorch 写法 torch.nn.functional.normalize(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.poisson_nll_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.poisson_nll_loss.md index 9a39d396355..7e7792dc82f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.poisson_nll_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.poisson_nll_loss.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.poisson_nll_loss - ### [torch.nn.functional.poisson\_nll\_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.poisson_nll_loss.html) - ```python torch.nn.functional.poisson_nll_loss(input, target, log_input=True, full=False, size_average=None, eps=1e-08, reduce=None, reduction='mean') ``` ### [paddle.nn.functional.poisson\_nll\_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/poisson_nll_loss_cn.html#poisson-nll-loss) - ```python paddle.nn.functional.poisson_nll_loss(input, label, log_input=True, full=False, epsilon=1e-8, reduction='mean', name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.poisson_nll_loss(input, label, log_input=True, full=False, 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -- | | input | input | 输入 Tensor。 | @@ -28,7 +24,6 @@ paddle.nn.functional.poisson_nll_loss(input, label, log_input=True, full=False, | reduction | reduction | 指定应用于输出结果的计算方式。 | ### 转写示例 - #### size_average、reduce ```python # PyTorch 的 size_average、reduce 参数转为 Paddle 的 reduction 参数 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.relu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.relu.md index 0ecc465459c..11df1c27231 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.relu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.relu.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.relu - +## [ torch 参数更多 ]torch.nn.functional.relu ### [torch.nn.functional.relu](https://pytorch.org/docs/stable/generated/torch.nn.functional.relu.html#torch.nn.functional.relu) - ```python torch.nn.functional.relu(input, inplace=False) ``` ### [paddle.nn.functional.relu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/relu_cn.html) - ```python paddle.nn.functional.relu(x, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.relu(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.rrelu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.rrelu.md index eb09a30ee29..6493876b03b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.rrelu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.rrelu.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.rrelu - +## [ torch 参数更多 ]torch.nn.functional.rrelu ### [torch.nn.functional.rrelu](https://pytorch.org/docs/stable/generated/torch.nn.functional.rrelu.html#torch.nn.functional.rrelu) - ```python torch.nn.functional.rrelu(input, lower=1.0 / 8, upper=1.0 / 3, training=False, inplace=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) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.rrelu(x, lower=1. / 8., upper=1. / 3., training=True, name= PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.scaled_dot_product_attention.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.scaled_dot_product_attention.md index 37158a8e724..a626a1c32f4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.scaled_dot_product_attention.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.scaled_dot_product_attention.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.functional.scaled_dot_product_attention - ### [torch.nn.functional.scaled_dot_product_attention](https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html#torch-nn-functional-scaled-dot-product-attention) - ```python torch.nn.functional.scaled_dot_product_attention(query, key, value, attn_mask=None, dropout_p=0.0, is_causal=False, scale=None, enable_gqa=False) ``` ### [paddle.nn.functional.scaled_dot_product_attention](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/scaled_dot_product_attention_cn.html#scaled-dot-product-attention) - ```python paddle.nn.functional.scaled_dot_product_attention(query, key, value, attn_mask=None, dropout_p=0.0, is_causal=False, training=True, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.scaled_dot_product_attention(query, key, value, attn_mask=N 两者功能基本一致,参数不一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | query | query | 注意力模块中的查询张量。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.selu.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.selu.md index 1cb53ec3b90..673fc31f139 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.selu.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.selu.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.selu - +## [ torch 参数更多 ]torch.nn.functional.selu ### [torch.nn.functional.selu](https://pytorch.org/docs/stable/generated/torch.nn.functional.selu.html#torch.nn.functional.selu) - ```python torch.nn.functional.selu(input, inplace=False) ``` ### [paddle.nn.functional.selu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/selu_cn.html) - ```python paddle.nn.functional.selu(x, scale=1.0507009873554804934193349852946, alpha=1.6732632423543772848170429916717, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.selu(x, scale=1.0507009873554804934193349852946, alpha=1.67 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.soft_margin_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.soft_margin_loss.md index 5b6d182bfd8..d873c34cccf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.soft_margin_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.soft_margin_loss.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.nn.functional.soft_margin_loss - ### [torch.nn.functional.soft_margin_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.soft_margin_loss.html?highlight=soft_margin_loss#torch.nn.functional.soft_margin_loss) - ```python torch.nn.functional.soft_margin_loss(input, target, @@ -11,7 +9,6 @@ torch.nn.functional.soft_margin_loss(input, ``` ### [paddle.nn.functional.soft_margin_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/soft_margin_loss_cn.html) - ```python paddle.nn.functional.soft_margin_loss(input, label, @@ -21,7 +18,6 @@ paddle.nn.functional.soft_margin_loss(input, 其中 PyTorch 相⽐ Paddle ⽀持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input | 输入 Tensor 。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.softmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.softmax.md index 26b26f5cb1a..079c061204a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.softmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.softmax.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]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) ``` ### [paddle.nn.functional.softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/softmax_cn.html#softmax) - ```python paddle.nn.functional.softmax(x, axis=-1, dtype=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.softmax(x, axis=-1, dtype=None, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | -------------- | ----------------------------------------------------- | | input | x | 表示输入张量,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.threshold.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.threshold.md index 1f3b9456c20..c3bb1530ff9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.threshold.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.threshold.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.functional.threshold - +## [ torch 参数更多 ]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, inplace=False) ``` ### [paddle.nn.functional.thresholded_relu](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/thresholded_relu_cn.html) - ```python paddle.nn.functional.thresholded_relu(x, threshold=1.0, value=0.0, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.functional.thresholded_relu(x, threshold=1.0, value=0.0, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | --------------------------------------------------------------------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.triplet_margin_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.triplet_margin_loss.md index e6a4cdec85f..9a6eb8a7615 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.triplet_margin_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.functional.triplet_margin_loss.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ] torch.nn.functional.triplet_margin_loss - +## [ torch 参数更多 ]torch.nn.functional.triplet_margin_loss ### [torch.nn.functional.triplet_margin_loss](https://pytorch.org/docs/stable/generated/torch.nn.functional.triplet_margin_loss.html?highlight=triplet_margin_loss#torch.nn.functional.triplet_margin_loss) - ```python torch.nn.functional.triplet_margin_loss(anchor, positive, @@ -16,7 +14,6 @@ torch.nn.functional.triplet_margin_loss(anchor, ``` ### [paddle.nn.functional.triplet_margin_loss](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/functional/triplet_margin_loss_cn.html) - ```python paddle.nn.functional.triplet_margin_loss(input, positive, @@ -31,7 +28,6 @@ paddle.nn.functional.triplet_margin_loss(input, 其中 PyTorch 相⽐ Paddle ⽀持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | anchor | input | 输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.modules.batchnorm._BatchNorm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.modules.batchnorm._BatchNorm.md index 3d560cc815a..dff8c525fe6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.modules.batchnorm._BatchNorm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.modules.batchnorm._BatchNorm.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.nn.modules.batchnorm._BatchNorm - ### [torch.nn.modules.batchnorm.\_BatchNorm](https://pytorch.org/docs/stable/_modules/torch/nn/modules/batchnorm.html) - ```python torch.nn.modules.batchnorm._BatchNorm(num_features, eps=1e-5, momentum=0.1, affine=True, track_running_stats=True, device=None, dtype=None) ``` ### [paddle.nn.layer.norm.\_BatchNormBase](https://github.com/PaddlePaddle/Paddle/blob/b51d50bc9ee9eaa5cefa18507195b239e4513194/python/paddle/nn/layer/norm.py#L701) - ```python paddle.nn.layer.norm._BatchNormBase(num_features, momentum=0.9, epsilon=1e-05, weight_attr=None, bias_attr=None, data_format='NCHW', use_global_stats=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.nn.layer.norm._BatchNormBase(num_features, momentum=0.9, epsilon=1e-05, w PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------- | ---------------------------- | --------- | | num_features | num_features | 特征数量。 | @@ -30,9 +26,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | data_format | 指定输入数据格式,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### affine:是否进行仿射变换 - ```python # 当 PyTorch 的 affine 为`False`,表示 weight 和 bias 不进行更新,torch 写法 torch.nn.modules.batchnorm._BatchNorm(num_features, affine=False) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.parallel.DistributedDataParallel.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.parallel.DistributedDataParallel.md index 9b5580ea02d..8f0a60f6534 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.parallel.DistributedDataParallel.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.parallel.DistributedDataParallel.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.nn.parallel.DistributedDataParallel - +## [ torch 参数更多 ]torch.nn.parallel.DistributedDataParallel ### [torch.nn.parallel.DistributedDataParallel](https://pytorch.org/docs/stable/generated/torch.nn.parallel.DistributedDataParallel.html#torch.nn.parallel.DistributedDataParallel) - ```python torch.nn.parallel.DistributedDataParallel(module, device_ids=None, output_device=None, dim=0, broadcast_buffers=True, process_group=None, bucket_cap_mb=25, find_unused_parameters=False, check_reduction=False, gradient_as_bucket_view=False, static_graph=False) ``` ### [paddle.DataParallel](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/DataParallel_cn.html) - ```python paddle.DataParallel(layers, strategy=None, comm_buffer_size=25, last_comm_buffer_size=1, find_unused_parameters=False) ``` @@ -15,7 +12,6 @@ paddle.DataParallel(layers, strategy=None, comm_buffer_size=25, last_comm_buffer PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------- | ---------------------- | ---------------------------------------------------------------------------------------- | | module | layers | 需要通过数据并行方式执行的模型,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.utils.clip_grad_norm_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.utils.clip_grad_norm_.md index 221a8eb3bf7..abe0ec69df4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.utils.clip_grad_norm_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.utils.clip_grad_norm_.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.utils.clip_grad_norm_ ### [torch.nn.utils.clip_grad_norm_](https://pytorch.org/docs/stable/generated/torch.nn.utils.clip_grad_norm_.html?highlight=clip_grad_norm_#torch.nn.utils.clip_grad_norm_) - ```python torch.nn.utils.clip_grad_norm_(parameters, max_norm, @@ -10,7 +9,6 @@ torch.nn.utils.clip_grad_norm_(parameters, ``` ### [paddle.nn.utils.clip_grad_norm_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/utils/clip_grad_norm__cn.html) - ```python paddle.nn.utils.clip_grad_norm_(parameters, max_norm, @@ -21,7 +19,6 @@ paddle.nn.utils.clip_grad_norm_(parameters, paddle 参数和 torch 参数完全一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | -------------------------------------- | | parameters | parameters | 需要参与梯度裁剪的一个 Tensor 或者多个 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.utils.clip_grad_value_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.utils.clip_grad_value_.md index 11567bd8f23..7133b4ea4d4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.utils.clip_grad_value_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.nn.utils.clip_grad_value_.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.nn.utils.clip_grad_value_ ### [torch.nn.utils.clip_grad_value_](https://pytorch.org/docs/stable/generated/torch.nn.utils.clip_grad_value_.html?highlight=clip_grad_value_#torch.nn.utils.clip_grad_value_) - ```python torch.nn.utils.clip_grad_value_(parameters, clip_value, @@ -8,7 +7,6 @@ torch.nn.utils.clip_grad_value_(parameters, ``` ### [paddle.nn.utils.clip_grad_value_](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/utils/clip_grad_value__cn.html) - ```python paddle.nn.utils.clip_grad_value_(parameters, clip_value) @@ -17,7 +15,6 @@ paddle.nn.utils.clip_grad_value_(parameters, paddle 参数和 torch 参数完全一致,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | -------------------------------------- | | parameters | parameters | 需要参与梯度裁剪的一个 Tensor 或者多个 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.normal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.normal.md index 97c1d4e7d8c..ea5051666fe 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.normal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.normal.md @@ -17,7 +17,6 @@ paddle.normal(mean=0.0, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | mean | mean | 表示正态分布的均值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.onnx.export.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.onnx.export.md index f7e6f80876e..920a7236042 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.onnx.export.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.onnx.export.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.onnx.export - +## [ torch 参数更多 ]torch.onnx.export ### [torch.onnx.export](https://pytorch.org/docs/stable/onnx.html#torch.onnx.export) - ```python torch.onnx.export(model, args, f, export_params=True, verbose=False, training=, input_names=None, output_names=None, operator_export_type=, opset_version=None, do_constant_folding=True, dynamic_axes=None, keep_initializers_as_inputs=None, custom_opsets=None, export_modules_as_functions=False) ``` ### [paddle.onnx.export](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/onnx/export_cn.html) - ```python paddle.onnx.export(layer, path, input_spec=None, opset_version=9, **configs) ``` @@ -15,7 +12,6 @@ paddle.onnx.export(layer, path, input_spec=None, opset_version=9, **configs) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | model | layer | 导出的模型,PyTorch 类型为 torch.nn.Module, torch.jit.ScriptModule 或 torch.jit.ScriptFunction,Paddle 为 Layer 对象,需要转写。 | @@ -37,9 +33,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | configs | 其他用于兼容的存储配置选项,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### 参数类型不同 - ```python # PyTorch 写法 torch.onnx.export( diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.ASGD.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.ASGD.md index 16616a64890..2ab0347d115 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.ASGD.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.ASGD.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.ASGD - ### [torch.optim.ASGD](https://pytorch.org/docs/stable/generated/torch.optim.ASGD.html) - ```python torch.optim.ASGD(params, lr=0.01, @@ -15,7 +13,6 @@ torch.optim.ASGD(params, ``` ### [paddle.optimizer.ASGD](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/ASGD_cn.html#cn-api-paddle-optimizer-asgd) - ```python paddle.optimizer.ASGD(learning_rate=0.001, batch_num=1, @@ -30,7 +27,6 @@ paddle.optimizer.ASGD(learning_rate=0.001, Pytorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致 | @@ -48,13 +44,11 @@ Pytorch 相比 Paddle 支持更多其他参数,具体如下: | - | name | 一般情况下无需设置。 PyTorch 无此参数,Paddle 保持默认即可 | ### 相关问题 - torch 当前版本的 ASGD 实现并不完善。转换过来的 paddle ASGD 会与 torch 的不一致(不影响收敛),但是可以正常使用。如果强需求保证转换前后一致,可以自行尝试其他优化器。 如果后续 torch 有代码更新,可以联系 @WintersMontagne10335 作 API 调整与对接。 #### torch 现存问题 - 在 `_single_tensor_asgd` 中,对 `axs, ax` 进行了更新,但是它们却并没有参与到 `params` 中。 `axs, ax` 完全没有作用。 调研到的比较可信的原因是,目前 `ASGD` 的功能并不完善, `axs, ax` 是预留给以后的版本的。 @@ -69,7 +63,6 @@ torch 当前版本的 ASGD 实现并不完善。转换过来的 paddle ASGD 会 - https://github.com/pytorch/pytorch/issues/74884 #### paddle 实现思路 - 主要参照 [`ASGD` 论文: Minimizing Finite Sums with the Stochastic Average Gradient](https://inria.hal.science/hal-00860051v2) 核心步骤为: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adadelta.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adadelta.md index 2051eba94e9..c5398628faa 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adadelta.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adadelta.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.Adadelta - ### [torch.optim.Adadelta](https://pytorch.org/docs/stable/generated/torch.optim.Adadelta.html) - ```python torch.optim.Adadelta(params, lr=1.0, @@ -14,7 +12,6 @@ torch.optim.Adadelta(params, ``` ### [paddle.optimizer.Adadelta](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Adadelta_cn.html#cn-api-paddle-optimizer-adadelta) - ```python paddle.optimizer.Adadelta(learning_rate=0.001, epsilon=1e-06, @@ -28,7 +25,6 @@ paddle.optimizer.Adadelta(learning_rate=0.001, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adagrad.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adagrad.md index 98ea7a5f206..c184971c35e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adagrad.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adagrad.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.Adagrad - ### [torch.optim.Adagrad](https://pytorch.org/docs/stable/generated/torch.optim.Adagrad.html) - ```python torch.optim.Adagrad(params, lr=1e-2, @@ -15,7 +13,6 @@ torch.optim.Adagrad(params, ``` ### [paddle.optimizer.Adagrad](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Adagrad_cn.html) - ```python paddle.optimizer.Adagrad(learning_rate, epsilon=1e-06, @@ -29,7 +26,6 @@ paddle.optimizer.Adagrad(learning_rate, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adam.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adam.md index cd23fe51900..46648585c55 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adam.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adam.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.Adam - ### [torch.optim.Adam](https://pytorch.org/docs/stable/generated/torch.optim.Adam.html) - ```python torch.optim.Adam(params, lr=0.001, @@ -17,7 +15,6 @@ torch.optim.Adam(params, ``` ### [paddle.optimizer.Adam](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Adam_cn.html) - ```python paddle.optimizer.Adam(learning_rate=0.001, beta1=0.9, @@ -36,7 +33,6 @@ paddle.optimizer.Adam(learning_rate=0.001, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.AdamW.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.AdamW.md index 3f87fe428e9..9e5c4459104 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.AdamW.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.AdamW.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.AdamW - ### [torch.optim.AdamW](https://pytorch.org/docs/stable/generated/torch.optim.AdamW.html) - ```python torch.optim.AdamW(params, lr=0.001, @@ -17,7 +15,6 @@ torch.optim.AdamW(params, ``` ### [paddle.optimizer.AdamW](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/AdamW_cn.html) - ```python paddle.optimizer.AdamW(learning_rate=0.001, beta1=0.9, @@ -37,7 +34,6 @@ paddle.optimizer.AdamW(learning_rate=0.001, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adamax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adamax.md index 6dc25927aea..3ed30cf1648 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adamax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Adamax.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.Adamax - ### [torch.optim.Adamax](https://pytorch.org/docs/stable/generated/torch.optim.Adamax.html) - ```python torch.optim.Adamax(params, lr=0.002, @@ -14,7 +12,6 @@ torch.optim.Adamax(params, ``` ### [paddle.optimizer.Adamax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Adamax_cn.html) - ```python paddle.optimizer.Adamax(learning_rate=0.001, beta1=0.9, @@ -29,7 +26,6 @@ paddle.optimizer.Adamax(learning_rate=0.001, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.NAdam.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.NAdam.md index 21647e843fa..f8161f73de6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.NAdam.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.NAdam.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.NAdam - ### [torch.optim.NAdam](https://pytorch.org/docs/stable/generated/torch.optim.NAdam.html#torch.optim.NAdam) - ```python torch.optim.NAdam(params, lr=0.002, @@ -17,7 +15,6 @@ torch.optim.NAdam(params, ``` ### [paddle.optimizer.NAdam](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/NAdam_cn.html#nadam) - ```python paddle.optimizer.NAdam(learning_rate=0.002, beta1=0.9, @@ -33,7 +30,6 @@ paddle.optimizer.NAdam(learning_rate=0.002, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Optimizer.step.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Optimizer.step.md index 07f396d3ae1..49a00cb3e57 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Optimizer.step.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Optimizer.step.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]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) ``` ### [paddle.optimizer.Optimizer.step](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Optimizer_cn.html#step) - ```python paddle.optimizer.Optimizer.step() ``` @@ -15,7 +12,6 @@ paddle.optimizer.Optimizer.step() PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ---------- | ---------------- | | closure | - | 重新评估模型并返回损失的闭包, Paddle 无此参数,暂无转写方式。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.RAdam.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.RAdam.md index ab8a1878f4a..a4541685ff4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.RAdam.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.RAdam.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.RAdam - ### [torch.optim.RAdam](https://pytorch.org/docs/stable/generated/torch.optim.RAdam.html#torch.optim.RAdam) - ```python torch.optim.RAdam(params, lr=0.001, @@ -16,7 +14,6 @@ torch.optim.RAdam(params, ``` ### [paddle.optimizer.RAdam](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/RAdam_cn.html#radam) - ```python paddle.optimizer.RAdam(learning_rate=0.001, beta1=0.9, @@ -31,7 +28,6 @@ paddle.optimizer.RAdam(learning_rate=0.001, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.RMSprop.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.RMSprop.md index bfc42953a0b..2f93c28235e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.RMSprop.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.RMSprop.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.RMSprop - ### [torch.optim.RMSprop](https://pytorch.org/docs/stable/generated/torch.optim.RMSprop.html) - ```python torch.optim.RMSprop(params, lr=0.01, @@ -16,7 +14,6 @@ torch.optim.RMSprop(params, ``` ### [paddle.optimizer.RMSProp](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/RMSProp_cn.html) - ```python paddle.optimizer.RMSProp(learning_rate, rho=0.95, @@ -32,7 +29,6 @@ paddle.optimizer.RMSProp(learning_rate, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Rprop.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Rprop.md index 2a1c07ff69c..9a9392b5765 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Rprop.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.Rprop.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.Rprop - ### [torch.optim.Rprop](https://pytorch.org/docs/stable/generated/torch.optim.Rprop.html) - ```python torch.optim.Rprop(params, lr=0.01, @@ -13,7 +11,6 @@ torch.optim.Rprop(params, ``` ### [paddle.optimizer.Rprop](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/Rprop_cn.html#cn-api-paddle-optimizer-rprop) - ```python paddle.optimizer.Rprop(learning_rate=0.001, learning_rate_range=(1e-5, 50), @@ -26,7 +23,6 @@ paddle.optimizer.Rprop(learning_rate=0.001, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.SGD.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.SGD.md index 8040d5bb779..c8a589f45b3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.SGD.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.optim.SGD.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.optim.SGD - ### [torch.optim.SGD](https://pytorch.org/docs/stable/generated/torch.optim.SGD.html) - ```python torch.optim.SGD(params, lr, @@ -15,7 +13,6 @@ torch.optim.SGD(params, ``` ### [paddle.optimizer.SGD](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/optimizer/SGD_cn.html) - ```python paddle.optimizer.SGD(learning_rate=0.001, parameters=None, @@ -27,7 +24,6 @@ paddle.optimizer.SGD(learning_rate=0.001, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------------------------------- | ------------ | ----------------------------------------------------------------------- | | params | parameters | 表示指定优化器需要优化的参数,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.ormqr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.ormqr.md index b47b0d37c47..005e891e584 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.ormqr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.ormqr.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.ormqr - ### [torch.ormqr](https://pytorch.org/docs/stable/generated/torch.ormqr.html#torch.ormqr) - ```python torch.ormqr(input, input2, input3, left=True, transpose=False, *, out=None) ``` ### [paddle.linalg.ormqr](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/linalg/ormqr_cn.html#ormqr) - ```python paddle.linalg.ormqr(x, tau, y, left=True, transpose=False) ``` @@ -15,7 +12,6 @@ paddle.linalg.ormqr(x, tau, y, left=True, transpose=False) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | ---------------------------------------------- | | input | x | 输入的参数,用于表示矩阵 Q ,仅参数名不一致 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor ,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.ormqr(x, tau, other, left, transpose, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.poisson.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.poisson.md index b8a577520a7..82e60ebdb37 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.poisson.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.poisson.md @@ -1,5 +1,4 @@ ## [ torch 参数更多 ]torch.poisson - ### [torch.poisson](https://pytorch.org/docs/stable/generated/torch.poisson.html#torch.poisson) ```python torch.poisson(input, @@ -13,7 +12,6 @@ paddle.poisson(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.profiler.profile.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.profiler.profile.md index fc3ff36c354..1fa8c7e08ad 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.profiler.profile.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.profiler.profile.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.profiler.profile - +## [ torch 参数更多 ]torch.profiler.profile ### [torch.profiler.profile](https://pytorch.org/docs/stable/profiler.html#torch.profiler.profile) - ```python torch.profiler.profile(*, activities=None, schedule=None, on_trace_ready=None, record_shapes=False, profile_memory=False, with_stack=False, with_flops=False, with_modules=False, experimental_config=None, use_cuda=None) ``` ### [paddle.profiler.Profiler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/profiler/Profiler_cn.html) - ```python paddle.profiler.Profiler(*, targets=None, scheduler=None, on_trace_ready=None, record_shapes=False, profile_memory=False, timer_only=False) ``` @@ -15,7 +12,6 @@ paddle.profiler.Profiler(*, targets=None, scheduler=None, on_trace_ready=None, r PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------- | | activities | targets | 指定性能分析所要分析的设备,PyTorch 为 torch.profiler.ProfilerActivity 类型,Paddle 为 paddle.profiler.ProfilerTarget 类型。 | @@ -31,9 +27,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | - | timer_only | 如果设置为 True,将只统计模型的数据读取和每一个迭代所消耗的时间,而不进行性能分析,PyTorch 无此参数,Paddle 保持默认即可。 | ### 转写示例 - #### 参数类型不同 - ```python # PyTorch 写法: with torch.profiler.profile( diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.qr.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.qr.md index c848145b57c..78c3fd5124f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.qr.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.qr.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.qr - +## [ torch 参数更多 ]torch.qr ### [torch.qr](https://pytorch.org/docs/stable/generated/torch.qr.html#torch.qr) - ```python torch.qr(input, some=True, *, out=None) ``` ### [paddle.linalg.qr](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/qr_cn.html#qr) - ```python paddle.linalg.qr(x, mode='reduced', name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.qr(x, mode='reduced', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.quantile.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.quantile.md index c719f1a03fa..9885f7b15a2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.quantile.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.quantile.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.quantile - ### [torch.quantile](https://pytorch.org/docs/stable/generated/torch.quantile.html?highlight=quantile#torch.quantile) - ```python torch.quantile(input, q, @@ -13,7 +11,6 @@ torch.quantile(input, ``` ### [paddle.quantile](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/quantile_cn.html) - ```python paddle.quantile(x, q, @@ -26,7 +23,6 @@ paddle.quantile(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.rad2deg.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.rad2deg.md index 59d7c6df202..091eb7e82f5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.rad2deg.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.rad2deg.md @@ -1,20 +1,16 @@ -## [torch 参数更多 ]torch.rad2deg - +## [ torch 参数更多 ]torch.rad2deg ### [torch.rad2deg](https://pytorch.org/docs/stable/generated/torch.rad2deg.html?highlight=torch+rad2deg#torch.rad2deg) - ```python torch.rad2deg(input, *, out=None) ``` ### [paddle.rad2deg](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/rad2deg_cn.html) - ```python paddle.rad2deg(x, name=None) ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randint.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randint.md index ce65279bc6e..876523bc54e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randint.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randint.md @@ -1,4 +1,4 @@ -## [torch 参数更多 ]torch.randint +## [ torch 参数更多 ]torch.randint ### [torch.randint](https://pytorch.org/docs/stable/generated/torch.randint.html?highlight=randint#torch.randint) ```python torch.randint(low=0, @@ -25,7 +25,6 @@ paddle.randint(low=0, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | low | low | 表示生成的随机值范围的下限(区间一般包含)。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randint_like.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randint_like.md index b00de3c37db..b4513d399a3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randint_like.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randint_like.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.randint_like - +## [ torch 参数更多 ]torch.randint_like ### [torch.randint_like](https://pytorch.org/docs/stable/generated/torch.randint_like.html?highlight=randint_like#torch.randint_like) - ```python torch.randint_like(input, low=0, @@ -17,7 +15,6 @@ torch.randint_like(input, ``` ### [paddle.randint_like](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/randint_like_cn.html) - ```python paddle.randint_like(x, low=0, @@ -29,7 +26,6 @@ paddle.randint_like(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | @@ -45,9 +41,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 - #### device: Tensor 的设备 - ```python # PyTorch 写法 torch.randint_like(x, 10, device=torch.device('cpu')) @@ -58,7 +52,6 @@ y.cpu() ``` #### requires_grad:是否求梯度 - ```python # PyTorch 写法 x = torch.randint_like(x, 10, requires_grad=True) @@ -69,7 +62,6 @@ x.stop_gradient = False ``` #### pin_memory:是否分配到固定内存上 - ```python # PyTorch 写法 x = torch.randint_like(x, 10, pin_memory=True) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randn_like.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randn_like.md index 2a1c320e69d..249be266831 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randn_like.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.randn_like.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.randn_like - +## [ torch 参数更多 ]torch.randn_like ### [torch.randn_like](https://pytorch.org/docs/stable/generated/torch.randn_like.html#torch.randn_like) - ```python torch.randn_like(input, *, dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) ``` ### [paddle.randn_like](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/randn_like_cn.html#randn_like) - ```python paddle.randn_like(x, dtype=None, name=None) ``` @@ -25,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | memory_format | - | 表示内存格式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - #### requires_grad:表示是否不阻断梯度传导 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.reciprocal.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.reciprocal.md index 5e749f06326..6599778f36b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.reciprocal.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.reciprocal.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.reciprocal - +## [ torch 参数更多 ]torch.reciprocal ### [torch.reciprocal](https://pytorch.org/docs/stable/generated/torch.reciprocal.html?highlight=torch+reciprocal#torch.reciprocal) - ```python torch.reciprocal(input, *, @@ -9,7 +7,6 @@ torch.reciprocal(input, ``` ### [paddle.reciprocal](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/reciprocal_cn.html) - ```python paddle.reciprocal(x, name=None) @@ -17,7 +14,6 @@ paddle.reciprocal(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.renorm.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.renorm.md index cd37df3bf08..3bf81c957e5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.renorm.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.renorm.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.renorm - +## [ torch 参数更多 ]torch.renorm ### [torch.renorm](https://pytorch.org/docs/stable/generated/torch.renorm.html#torch-renorm) - ```python torch.renorm(input, p, dim, maxnorm, *, out=None) ``` ### [paddle.renorm]() - ```python paddle.renorm(x, p, axis, max_norm) ``` @@ -15,7 +12,6 @@ paddle.renorm(x, p, axis, max_norm) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | maxnorm | max_norm | 表示子张量的 p-范数最大值,仅参数名不一致。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.renorm(x, 1, 0, 5, out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.round.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.round.md index 61993dc7408..463fa8b3d8f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.round.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.round.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.round +## [ torch 参数更多 ]torch.round ### [torch.round](https://pytorch.org/docs/stable/generated/torch.round.html?highlight=round#torch.round) - ```python torch.round(input, *, @@ -9,7 +8,6 @@ torch.round(input, ``` ### [paddle.round](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/round_cn.html#round) - ```python paddle.round(x, name=None) @@ -17,7 +15,6 @@ paddle.round(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.save.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.save.md index 1ad263bf855..113dbf6844a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.save.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.save.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.save +## [ torch 参数更多 ]torch.save ### [torch.save](https://pytorch.org/docs/stable/generated/torch.save.html?highlight=save#torch.save) - ```python torch.save(obj, f, @@ -10,7 +9,6 @@ torch.save(obj, ``` ### [paddle.save](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/save_cn.html#save) - ```python paddle.save(obj, path, @@ -19,7 +17,6 @@ paddle.save(obj, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | obj | obj | 要保存的对象实例,torch 支持 io.BytesIO、io.StringIO、文件,paddle 只支持文件,暂无转写方式。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.scalar_tensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.scalar_tensor.md index 76f8c310c53..812ab62855c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.scalar_tensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.scalar_tensor.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.scalar_tensor +## [ torch 参数更多 ]torch.scalar_tensor ### [torch.scalar_tensor] - ```python torch.scalar_tensor(s, dtype=torch.float32, @@ -11,7 +10,6 @@ torch.scalar_tensor(s, ``` ### [paddle.to_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/to_tensor_cn.html#to-tensor) - ```python paddle.to_tensor(data, dtype=None, @@ -21,7 +19,6 @@ paddle.to_tensor(data, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | s | data | 表示输入的数据。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.searchsorted.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.searchsorted.md index 586e5c4ba68..8f74177a3a1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.searchsorted.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.searchsorted.md @@ -1,7 +1,5 @@ -## [ torch 参数更多]torch.searchsorted - +## [ torch 参数更多 ]torch.searchsorted ### [torch.searchsorted](https://pytorch.org/docs/stable/generated/torch.searchsorted.html#torch-searchsorted) - ```python torch.searchsorted(sorted_sequence, values, @@ -14,7 +12,6 @@ torch.searchsorted(sorted_sequence, ``` ### [paddle.searchsorted](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/searchsorted_cn.html#searchsorted) - ```python paddle.searchsorted(sorted_sequence, values, @@ -26,7 +23,6 @@ paddle.searchsorted(sorted_sequence, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | --------------------------------------------------- | | sorted_sequence | sorted_sequence | 表示待查找的 Tensor 。 | @@ -39,7 +35,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 #### side:指定查找对应的上边界或下边界 - ```python # PyTorch 写法 torch.searchsorted(x,y, side='right') @@ -49,7 +44,6 @@ paddle.searchsorted(x,y,right=True) ``` #### out:指定输出 - ```python # PyTorch 写法 torch.searchsorted(x,y, out=output) @@ -59,7 +53,6 @@ paddle.assign(paddle.searchsorted(x,y), output) ``` #### sorter: 提供 sorted_sequence 为无序 Tensor 时,相对应的升序索引 - ```python # PyTorch 写法 torch.searchsorted(x,y, sorter=sorter) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.set_printoptions.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.set_printoptions.md index f976612710c..f948f02598b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.set_printoptions.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.set_printoptions.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.set_printoptions - ### [torch.set_printoptions](https://pytorch.org/docs/stable/generated/torch.set_printoptions.html?highlight=torch+set_printoptions#torch.set_printoptions) - ```python torch.set_printoptions(precision=None, threshold=None, edgeitems=None, linewidth=None, profile=None, sci_mode=None) ``` ### [paddle.set_printoptions](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/set_printoptions_cn.html) - ```python paddle.set_printoptions(precision=None, threshold=None, edgeitems=None, sci_mode=None, linewidth=None) ``` @@ -15,7 +12,6 @@ paddle.set_printoptions(precision=None, threshold=None, edgeitems=None, sci_mode PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | --------- | ------------ | ------------------------------------------------------------ | | precision | precision | 浮点数的小数位数, PyTorch 默认值为 4,Paddle 默认为 8。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | profile | - | 预设风格,支持 `default`, `short`, `full`。 Paddle 无此参数, 需要转写。 | ### 转写示例 - #### profile:预设风格,设置为 `default`。 - ```python # PyTorch 写法 torch.set_printoptions(profile='default') @@ -38,7 +32,6 @@ paddle.set_printoptions(precision=4, threshold=1000, edgeitems=3, linewidth=80) ``` #### profile:预设风格,设置为 `short`。 - ```python # PyTorch 写法 torch.set_printoptions(profile='short') @@ -48,7 +41,6 @@ paddle.set_printoptions(precision=2, threshold=1000, edgeitems=2, linewidth=80) ``` #### profile:预设风格,设置为 `full`。 - ```python # PyTorch 写法 torch.set_printoptions(profile='full') diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sgn.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sgn.md index a57bd8f2d5d..34f4ea8fb6e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sgn.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sgn.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.sgn +## [ torch 参数更多 ]torch.sgn ### [torch.sgn](https://pytorch.org/docs/stable/generated/torch.sgn.html?highlight=torch+sgn#torch.sgn) - ```python torch.sgn(input, *, @@ -8,7 +7,6 @@ torch.sgn(input, ``` ### [paddle.sgn](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sgn_cn.html) - ```python paddle.sgn(x, name=None) @@ -16,7 +14,6 @@ paddle.sgn(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.blackman.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.blackman.md index 477fbbcfb35..e4c25c79c29 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.blackman.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.blackman.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.signal.windows.blackman ### [torch.signal.windows.blackman](https://pytorch.org/docs/stable/generated/torch.signal.windows.blackman.html) - ```python torch.signal.windows.blackman(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `blackman`。 | @@ -25,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.cosine.md index 7b7dd0d3202..6c977b02ef3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.cosine.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.signal.windows.cosine ### [torch.signal.windows.cosine](https://pytorch.org/docs/stable/generated/torch.signal.windows.cosine.html) - ```python torch.signal.windows.cosine(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `cosine`。 | @@ -25,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.exponential.md index a3e97c8c2a8..563e286f857 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.exponential.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.exponential.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.signal.windows.exponential ### [torch.signal.windows.exponential](https://pytorch.org/docs/stable/generated/torch.signal.windows.exponential.html) - ```python torch.signal.windows.exponential(M, *, center=None, tau=1.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `exponential`。 | @@ -27,7 +24,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.gaussian.md index 0d6d1d6bd19..4cb86b0a77b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.gaussian.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.signal.windows.gaussian ### [torch.signal.windows.gaussian](https://pytorch.org/docs/stable/generated/torch.signal.windows.gaussian.html) - ```python torch.signal.windows.gaussian(M, *, std=1.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `gaussian`。 | @@ -26,7 +23,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.general_cosine.md index acbf57b35ee..77d26f56383 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.general_cosine.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.signal.windows.general_cosine ### [torch.signal.windows.general_cosine](https://pytorch.org/docs/stable/generated/torch.signal.windows.general_cosine.html) - ```python torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `general_cosine`。 | @@ -26,7 +23,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.general_hamming.md index 0ea1377b9bb..3de56133445 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.general_hamming.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.signal.windows.general_hamming ### [torch.signal.windows.general_hamming](https://pytorch.org/docs/stable/generated/torch.signal.windows.general_hamming.html) - ```python torch.signal.windows.general_hamming(M, *, alpha=0.54, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `general_hamming`。 | @@ -26,7 +23,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.hamming.md index df9f30c3a5d..7c274d91a3c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.hamming.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.signal.windows.hamming ### [torch.signal.windows.hamming](https://pytorch.org/docs/stable/generated/torch.signal.windows.hamming.html) - ```python torch.signal.windows.hamming(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `hamming`。 | @@ -25,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.hann.md index 8daea67b3ce..5b9f9cc3a15 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.hann.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signal.windows.hann.md @@ -1,19 +1,16 @@ ## [ torch 参数更多 ]torch.signal.windows.hann ### [torch.signal.windows.hann](https://pytorch.org/docs/stable/generated/torch.signal.windows.hann.html) - ```python torch.signal.windows.hann(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) - ```python paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `hann`。 | @@ -25,7 +22,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | ### 转写示例 - #### window:窗函数类型 ```python # PyTorch 写法 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signbit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signbit.md index 5b1d6825252..c96cdf3542e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signbit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.signbit.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.signbit - +## [ torch 参数更多 ]torch.signbit ### [torch.signbit](https://pytorch.org/docs/stable/generated/torch.signbit.html#torch-signbit) - ```python torch.signbit(input, *, out=None) ``` ### [paddle.signbit](https://github.com/PaddlePaddle/Paddle/blob/9ce3a54f456011c664c70fbcd318f2e1af0a7d81/python/paddle/tensor/math.py#L7175) - ```python paddle.signbit(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.signbit(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------- | | input | x | 输入 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.signbit([1., 2., 3., -1.], out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sinh.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sinh.md index 967f1dd383c..4fd47598746 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sinh.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sinh.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.sinh +## [ torch 参数更多 ]torch.sinh ### [torch.sinh](https://pytorch.org/docs/stable/generated/torch.sinh.html?highlight=sinh#torch.sinh) - ```python torch.sinh(input, *, @@ -8,7 +7,6 @@ torch.sinh(input, ``` ### [paddle.sinh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sinh_cn.html#sinh) - ```python paddle.sinh(x, name=None) @@ -16,7 +14,6 @@ paddle.sinh(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sparse.softmax.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sparse.softmax.md index 6922c522442..cf7cce15a35 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sparse.softmax.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sparse.softmax.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.sparse.softmax - +## [ torch 参数更多 ]torch.sparse.softmax ### [torch.sparse.softmax](https://pytorch.org/docs/stable/generated/torch.sparse.softmax.html#torch.sparse.softmax) - ```python torch.sparse.softmax(input, dim, dtype=None) ``` ### [paddle.sparse.nn.functional.softmax](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sparse/nn/functional/softmax_cn.html) - ```python paddle.sparse.nn.functional.softmax(x, axis=-1, name=None) ``` @@ -15,7 +12,6 @@ paddle.sparse.nn.functional.softmax(x, axis=-1, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | -------- | ----------- | ---------------------------------------------------- | | input | x | 输入的稀疏 Tensor,仅参数名不一致。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sparse_csr_tensor.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sparse_csr_tensor.md index a273ed3a3c5..e4383aa00f3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sparse_csr_tensor.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.sparse_csr_tensor.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torch.sparse_csr_tensor - +## [ torch 参数更多 ]torch.sparse_csr_tensor ### [torch.sparse_csr_tensor](https://pytorch.org/docs/stable/generated/torch.sparse_csr_tensor.html#torch.sparse_csr_tensor) - ```python torch.sparse_csr_tensor(crow_indices, col_indices, @@ -17,7 +15,6 @@ torch.sparse_csr_tensor(crow_indices, ``` ### [paddle.sparse.sparse_csr_tensor](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sparse/sparse_csr_tensor_cn.html#sparse-csr-tensor) - ```python paddle.sparse.sparse_csr_tensor(crows, cols, values, shape=None, dtype=None, place=None, stop_gradient=True) ``` @@ -25,7 +22,6 @@ paddle.sparse.sparse_csr_tensor(crows, cols, values, shape=None, dtype=None, pla PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------------- | ------------- | ----------------------------------------------------------------------------------- | | crow_indices | crows | 每行第一个非零元素在 values 的起始位置,仅参数名不一致。 | @@ -40,9 +36,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | check_invariants | - | 是否检查稀疏 Tensor 变量,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - #### requires_grad 参数:是否阻断 Autograd 的梯度传导 - ```python # PyTorch 写法 crows = [0, 2, 3, 5] diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.digamma.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.digamma.md index 7fc7d887e27..db962d5f031 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.digamma.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.digamma.md @@ -14,7 +14,6 @@ paddle.digamma(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.erf.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.erf.md index 51ca2f6998e..4332f18a982 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.erf.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.erf.md @@ -1,14 +1,11 @@ ## [ torch 参数更多 ]torch.special.erf - ### [torch.special.erf](https://pytorch.org/docs/stable/special.html?highlight=torch+special+erf#torch.special.erf) - ```python torch.special.erf(input, out=None) ``` ### [paddle.erf](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/erf_cn.html) - ```python paddle.erf(x, name=None) @@ -16,16 +13,13 @@ paddle.erf(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.special.erf(t, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.erfinv.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.erfinv.md index 1b346fa7722..4fb49e686f4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.erfinv.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.erfinv.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.special.erfinv - +## [ torch 参数更多 ]torch.special.erfinv ### [torch.special.erfinv](https://pytorch.org/docs/stable/special.html#torch.special.erfinv) - ```python torch.special.erfinv(input, *, out=None) ``` ### [paddle.erfinv](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/erfinv_cn.html) - ```python paddle.erfinv(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.erfinv(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.special.erfinv(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.expm1.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.expm1.md index 141e1364b92..46a10ab7271 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.expm1.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.expm1.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.special.expm1 ### [torch.special.expm1](https://pytorch.org/docs/stable/special.html#torch.special.expm1) - ```python torch.special.expm1(input, *, @@ -8,7 +7,6 @@ torch.special.expm1(input, ``` ### [paddle.expm1](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/expm1_cn.html) - ```python paddle.expm1(x, name=None) @@ -16,7 +14,6 @@ paddle.expm1(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 该 OP 的输入为多维 Tensor。数据类型为:float16、float32、float64,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammainc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammainc.md index f49d967de85..5cdccff90fa 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammainc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammainc.md @@ -1,7 +1,5 @@ -## [torch 参数更多] torch.special.gammainc - +## [ torch 参数更多 ]torch.special.gammainc ### [torch.special.gammainc](https://pytorch.org/docs/stable/special.html#torch.special.gammainc) - ```python torch.special.gammainc(input, other, @@ -10,7 +8,6 @@ torch.special.gammainc(input, ``` ### [paddle.gammainc](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/index_cn.html) - ```python paddle.gammainc(x, y) @@ -19,7 +16,6 @@ paddle.gammainc(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------ | ------------------------------------------------------------ | | input | x | 第一个非负输入张量,仅参数名不一致。 | @@ -27,9 +23,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.special.gammainc(torch.tensor([1.0,2.0]),torch.tensor([3.0,4.0]),out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammaincc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammaincc.md index b1c31722d45..d5f523b6ae1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammaincc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammaincc.md @@ -1,7 +1,5 @@ ## [ torch 参数更多 ]torch.special.gammaincc - ### [torch.special.gammaincc](https://pytorch.org/docs/stable/special.html#torch.special.gammaincc) - ```python torch.special.gammaincc(input, other, @@ -10,7 +8,6 @@ torch.special.gammaincc(input, ``` ### [paddle.gammaincc](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/index_cn.html) - ```python paddle.gammaincc(x, y) @@ -19,7 +16,6 @@ paddle.gammaincc(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------ | ------------------------------------------------------------ | | input | x | 第一个非负输入张量,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammaln.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammaln.md index 44ece358288..c88ac721a62 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammaln.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.gammaln.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.special.gammaln - +## [ torch 参数更多 ]torch.special.gammaln ### [torch.special.gammaln](https://pytorch.org/docs/stable/special.html#torch.special.gammaln) - ```python torch.special.gammaln(input, *, out=None) ``` ### [paddle.gammaln](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/gammaln_cn.html#gammaln) - ```python paddle.gammaln(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.gammaln(x, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.special.gammaln(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i0.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i0.md index 84f0462bdba..64d76011649 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i0.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i0.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.special.i0 - +## [ torch 参数更多 ]torch.special.i0 ### [torch.special.i0](https://pytorch.org/docs/stable/special.html#torch.special.i0) - ```python torch.special.i0(input, *, out=None) ``` ### [paddle.i0](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/i0_cn.html) - ```python paddle.i0(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.i0(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 x = torch.tensor([1, 2, 3, 4, 5], dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i0e.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i0e.md index 7772b7ef5b3..f169a2fc3d8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i0e.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i0e.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.special.i0e - +## [ torch 参数更多 ]torch.special.i0e ### [torch.special.i0e](https://pytorch.org/docs/stable/special.html#torch.special.i0e) - ```python torch.special.i0e(input, *, out=None) ``` ### [paddle.i0e](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/i0e_cn.html) - ```python paddle.i0e(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.i0e(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 x = torch.tensor([1, 2, 3, 4, 5], dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i1.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i1.md index f686e040942..5865427f1f6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i1.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i1.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.special.i1 - +## [ torch 参数更多 ]torch.special.i1 ### [torch.special.i1](https://pytorch.org/docs/stable/special.html#torch.special.i1) - ```python torch.special.i1(input, *, out=None) ``` ### [paddle.i1](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/i1_cn.html) - ```python paddle.i1(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.i1(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 x = torch.tensor([1, 2, 3, 4, 5], dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i1e.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i1e.md index 160ca681dd6..d7b39560f16 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i1e.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.i1e.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.special.i1e - +## [ torch 参数更多 ]torch.special.i1e ### [torch.special.i1e](https://pytorch.org/docs/stable/special.html#torch.special.i1e) - ```python torch.special.i1e(input, *, out=None) ``` ### [paddle.i1e](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/i1e_cn.html) - ```python paddle.i1e(x, name=None) ``` @@ -15,16 +12,13 @@ paddle.i1e(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------- | | input | x | 表示输入的 Tensor,仅参数名不一致。 | | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 x = torch.tensor([1, 2, 3, 4, 5], dtype=torch.float32) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.log1p.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.log1p.md index 2c05add048b..668ab15fc27 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.log1p.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.log1p.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.special.log1p +## [ torch 参数更多 ]torch.special.log1p ### [torch.special.log1p](https://pytorch.org/docs/stable/special.html#torch.special.log1p) - ```python torch.special.log1p(input, *, @@ -8,7 +7,6 @@ torch.special.log1p(input, ``` ### [paddle.log1p](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/log1p_cn.html#log1p) - ```python paddle.log1p(x, name=None) @@ -16,7 +14,6 @@ paddle.log1p(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.logit.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.logit.md index fd0cbc4e5f9..debd3efdfa9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.logit.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.logit.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.special.logit - +## [ torch 参数更多 ]torch.special.logit ### [torch.special.logit](https://pytorch.org/docs/stable/special.html#torch.special.logit) - ```python torch.special.logit(input, eps=None, *, out=None) ``` ### [paddle.logit](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/logit_cn.html) - ```python paddle.logit(x, eps=None, name=None) ``` @@ -15,7 +12,6 @@ paddle.logit(x, eps=None, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.special.logit(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.multigammaln.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.multigammaln.md index 8a681489e07..4adb9eec869 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.multigammaln.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.multigammaln.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torch.special.multigammaln - +## [ torch 参数更多 ]torch.special.multigammaln ### [torch.special.multigammaln](https://pytorch.org/docs/stable/special.html#torch.special.multigammaln) - ```python torch.special.multigammaln(input, p, *, out=None) ``` ### [paddle.multigammaln](https://github.com/PaddlePaddle/Paddle/blob/be090bd0bc9ac7a8595296c316b3a6ed3dc60ba6/python/paddle/tensor/math.py#L5099) - ```python paddle.multigammaln(x, p, name=None) ``` @@ -15,7 +12,6 @@ paddle.multigammaln(x, p, name=None) 其中 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ----------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | @@ -23,9 +19,7 @@ paddle.multigammaln(x, p, name=None) | out | - | 表示输出的 Tensor, Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.special.multigammaln(x, p, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.polygamma.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.polygamma.md index c9ce6bb72e9..6c0ff479cb5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.polygamma.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.polygamma.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.special.polygamma - ### [torch.special.polygamma](https://pytorch.org/docs/stable/special.html#torch.special.polygamma) - ```python torch.special.polygamma(n, input, *, out=None) ``` ### [paddle.polygamma](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/polygamma_cn.html#paddle.polygamma) - ```python paddle.polygamma(x, n, name=None) ``` @@ -15,7 +12,6 @@ paddle.polygamma(x, n, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | ---------------------------------------------------- | | n | n | 指定需要求解 n 阶多伽马函数。 | @@ -23,9 +19,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### out:指定输出 - ```python # PyTorch 写法 torch.special.polygamma(n, x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.psi.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.psi.md index daf40a4b757..8e9a40ca0c6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.psi.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.psi.md @@ -14,7 +14,6 @@ paddle.digamma(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.round.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.round.md index cd0e79ef829..bf2d9d7a2c7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.round.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.round.md @@ -1,14 +1,11 @@ -## [torch 参数更多]torch.special.round - +## [ torch 参数更多 ]torch.special.round ### [torch.special.round](https://pytorch.org/docs/stable/special.html#torch.special.round) - ```python # torch.special.round 为 torch.round 别名,参数和 torch.round 相同 torch.special.round(input, *, decimals=0, out=None) ``` ### [paddle.round](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/round_cn.html) - ```python paddle.round(x, name=None) ``` @@ -16,7 +13,6 @@ paddle.round(x, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -------------------------------------------------- | | input | x | 输入的 Tensor,仅参数名不一致。 | @@ -24,7 +20,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor,Paddle 无此参数,需要转写。 | ### 转写示例 - #### decimals:要舍入到的小数位数 ```python # PyTorch 写法 @@ -37,7 +32,6 @@ paddle.round(1e2 * x) / 1e2 ``` #### out 参数:输出的 Tensor - ```python # PyTorch 写法: torch.special.round(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.sinc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.sinc.md index 40c9cbd8fb8..e4ce79823e1 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.sinc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.special.sinc.md @@ -1,19 +1,15 @@ -## [ torch 参数更多 ] torch.special.sinc - +## [ torch 参数更多 ]torch.special.sinc ### [torch.special.sinc](https://pytorch.org/docs/stable/special.html#torch.special.sinc) - ```python torch.special.sinc(input, *, out=None) ``` ### [paddle.sinc](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/sinc_cn.html#sinc) - ```python paddle.sinc(x, name=None) ``` ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ----------------------------------------------------------------------------- | | input | x | 表示输出的 Tensor, 仅参数名不一致 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.square.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.square.md index 8aa7cb862c8..0193fbfef11 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.square.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.square.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.square +## [ torch 参数更多 ]torch.square ### [torch.square](https://pytorch.org/docs/stable/generated/torch.square.html?highlight=square#torch.square) - ```python torch.square(input, *, @@ -8,7 +7,6 @@ torch.square(input, ``` ### [paddle.square](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/square_cn.html) - ```python paddle.square(x, name=None) @@ -16,7 +14,6 @@ paddle.square(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 表示输入的 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.std.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.std.md index bcc431e5807..bce350e08b3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.std.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.std.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]torch.std - ### [torch.std](https://pytorch.org/docs/stable/generated/torch.std.html) - ```python torch.std(input, dim=None, unbiased=True, keepdim=False, *, correction=1, out=None) ``` ### [paddle.std](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/std_cn.html#std) - ```python paddle.std(x, axis=None, unbiased=True, keepdim=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.std(x, axis=None, unbiased=True, keepdim=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ---------- | ------------ | -- | | input | x | 输入张量,仅参数名不一致。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor ,Paddle 无此参数,需要转写。 | ### 转写示例 - #### correction - ```python # PyTorch torch.std(x, dim, correction=0) @@ -45,7 +39,6 @@ paddle.std(x, dim, unbiased=True) ``` #### out - ```python # PyTorch torch.std(x, out=y) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.stft.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.stft.md index e765f1e59d1..058dd69c052 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.stft.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.stft.md @@ -1,7 +1,5 @@ -## [torch 参数更多 ]torch.stft - +## [ torch 参数更多 ]torch.stft ### [torch.stft](https://pytorch.org/docs/stable/generated/torch.stft.html?highlight=stft#torch.stft) - ```python torch.stft(input, n_fft, @@ -16,7 +14,6 @@ torch.stft(input, ``` ### [paddle.signal.stft](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/signal/stft_cn.html#paddle.signal.stft) - ```python paddle.signal.stft(x, n_fft, @@ -33,7 +30,6 @@ paddle.signal.stft(x, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的数据,是维度为 1D 或者 2D 的 Tensor, 数据类型可为复数(复信号),仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.svd.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.svd.md index 48e09bb5606..7a0a50b48ac 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.svd.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.svd.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.svd - +## [ torch 参数更多 ]torch.svd ### [torch.svd](https://pytorch.org/docs/stable/generated/torch.svd.html?highlight=torch+svd#torch.svd) - ```python torch.svd(input, some=True, compute_uv=True, *, out=None) ``` ### [paddle.linalg.svd](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/svd_cn.html#svd) - ```python paddle.linalg.svd(x, full_matrics=False, name=None) ``` @@ -15,7 +12,6 @@ paddle.linalg.svd(x, full_matrics=False, name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入 Tensor ,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.symeig.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.symeig.md index be21a82e648..fe6c97651cb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.symeig.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.symeig.md @@ -1,14 +1,11 @@ -## [ torch 参数更多 ] torch.symeig - +## [ torch 参数更多 ]torch.symeig ### [torch.symeig](https://pytorch.org/docs/stable/generated/torch.symeig.html?highlight=torch+symeig#torch.symeig) - ```python # pytorch1.9 以上版本不支持 torch.symeig(input, eigenvectors=False, upper=True, *, out=None) ``` ### [paddle.linalg.eigh](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/linalg/eigh_cn.html#eigh) - ```python # eigenvectors 为 True paddle.linalg.eigh(x, UPLO='L', name=None) @@ -20,7 +17,6 @@ paddle.linalg.eigvalsh(x, UPLO='L', name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的对称 Tensor,仅参数名不一致。 | @@ -29,7 +25,6 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor 元组, Paddle 无此参数,需要转写。 | ### 转写示例 - #### eigenvectors:表示是否计算特征向量 ```python # PyTorch 写法,eigenvectors 为 False diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.tensordot.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.tensordot.md index 9bead5429bd..15642482499 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.tensordot.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.tensordot.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.tensordot - +## [ torch 参数更多 ]torch.tensordot ### [torch.tensordot](https://pytorch.org/docs/stable/generated/torch.tensordot.html?highlight=tensordot#torch.tensordot) - ```python torch.tensordot(a,b,dims=2,out=None) ``` ### [paddle.tensordot](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/tensordot_cn.html) - ```python paddle.tensordot(x,y,axes=2,name=None) ``` @@ -15,7 +12,6 @@ paddle.tensordot(x,y,axes=2,name=None) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------- | ------- | | a | x | 表示缩并运算的左张量,仅参数名不一致。 | @@ -24,9 +20,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | ### 转写示例 - #### out: 输出的 Tensor - ```python # PyTorch 写法 torch.tensordot(x,y,axes,out=output) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.tril_indices.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.tril_indices.md index fb7879fe56b..6e664460b73 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.tril_indices.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.tril_indices.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.tril_indices - +## [ torch 参数更多 ]torch.tril_indices ### [torch.tril_indices](https://pytorch.org/docs/stable/generated/torch.tril_indices.html?highlight=tril_indices#torch.tril_indices) - ```python torch.tril_indices(row,col,offset=0,*,dtype=torch.long,device='cpu',layout=torch.strided) ``` ### [paddle.tril_indices](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/tril_indices_cn.html) - ```python paddle.tril_indices(row,col,offset=0,dtype='int64') ``` @@ -15,7 +12,6 @@ paddle.tril_indices(row,col,offset=0,dtype='int64') PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------- | ------- | | row | row | 表示输入 Tensor 的行数。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - #### device: Tensor 的设备 - ```python # PyTorch 写法 torch.tril_indices(row,col,offset,dtype,device=torch.device('cpu')) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.triu_indices.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.triu_indices.md index 86e56575eb7..7fd610209ed 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.triu_indices.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.triu_indices.md @@ -1,13 +1,10 @@ -## [ torch 参数更多]torch.triu_indices - +## [ torch 参数更多 ]torch.triu_indices ### [torch.triu_indices](https://pytorch.org/docs/stable/generated/torch.triu_indices.html?highlight=triu_indices#torch.triu_indices) - ```python torch.triu_indices(row,col,offset=0,*,dtype=torch.long,device='cpu',layout=torch.strided) ``` ### [paddle.triu_indices](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/triu_indices_cn.html) - ```python paddle.triu_indices(row,col=None,offset=0,dtype='int64') ``` @@ -15,7 +12,6 @@ paddle.triu_indices(row,col=None,offset=0,dtype='int64') PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------- | ------- | ------- | | row | row | 表示输入 Tensor 的行数。 | @@ -26,9 +22,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | ### 转写示例 - #### device: Tensor 的设备 - ```python # PyTorch 写法 y = torch.triu_indices(row,col,offset,dtype,device=torch.device('cpu')) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.trunc.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.trunc.md index ad822ea73a8..44225a424a0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.trunc.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.trunc.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.trunc ### [torch.trunc](https://pytorch.org/docs/stable/generated/torch.trunc.html?highlight=torch+trunc#torch.trunc) - ```python torch.trunc(input, *, @@ -8,7 +7,6 @@ torch.trunc(input, ``` ### [paddle.trunc](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/trunc_cn.html) - ```python paddle.trunc(input, name=None) @@ -16,7 +14,6 @@ paddle.trunc(input, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | input | 表示输入的 Tensor。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.unique.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.unique.md index c32159b9af4..8e38ecc8244 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.unique.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.unique.md @@ -1,6 +1,5 @@ -## [torch 参数更多 ]torch.unique +## [ torch 参数更多 ]torch.unique ### [torch.unique](https://pytorch.org/docs/stable/generated/torch.unique.html?highlight=unique#torch.unique) - ```python torch.unique(input, sorted, @@ -10,7 +9,6 @@ torch.unique(input, ``` ### [paddle.unique](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/unique_cn.html#unique) - ```python paddle.unique(x, return_index=False, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.checkpoint.checkpoint.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.checkpoint.checkpoint.md index 146d5fa5e4b..0b9da226353 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.checkpoint.checkpoint.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.checkpoint.checkpoint.md @@ -1,12 +1,10 @@ ## [ torch 参数更多 ]torch.utils.checkpoint.checkpoint ### [torch.utils.checkpoint.checkpoint](https://pytorch.org/docs/stable/checkpoint.html#torch.utils.checkpoint.checkpoint) - ```python torch.utils.checkpoint.checkpoint(function, *args, use_reentrant=None, context_fn=, determinism_check='default', debug=False, preserve_rng_state=True, **kwargs) ``` ### [paddle.distributed.fleet.utils.recompute](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/utils/cpp_extension/CppExtension_cn.html) - ```python paddle.distributed.fleet.utils.recompute(function, preserve_rng_state=True, use_reentrant=True, *args, **kwargs) ``` @@ -14,7 +12,6 @@ paddle.distributed.fleet.utils.recompute(function, preserve_rng_state=True, use_ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | function | function | 模型前向传播的部分连续的层函数组成的序列。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.CUDAExtension.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.CUDAExtension.md index 3019617f8ef..248c232c830 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.CUDAExtension.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.CUDAExtension.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.utils.cpp_extension.CUDAExtension ### [torch.utils.cpp_extension.CUDAExtension](https://pytorch.org/docs/stable/cpp_extension.html?highlight=torch+utils+cpp_extension+cudaextension#torch.utils.cpp_extension.CUDAExtension) - ```python torch.utils.cpp_extension.CUDAExtension(name, sources, @@ -9,7 +8,6 @@ torch.utils.cpp_extension.CUDAExtension(name, ``` ### [paddle.utils.cpp_extension.CUDAExtension](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/utils/cpp_extension/CUDAExtension_cn.html) - ```python paddle.utils.cpp_extension.CUDAExtension(sources, *args, @@ -18,7 +16,6 @@ paddle.utils.cpp_extension.CUDAExtension(sources, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | name | - | 参数 name,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.CppExtension.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.CppExtension.md index 17f204a7e97..50b20fe7206 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.CppExtension.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.CppExtension.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.utils.cpp_extension.CppExtension ### [torch.utils.cpp_extension.CppExtension](https://pytorch.org/docs/stable/cpp_extension.html?highlight=torch+utils+cpp_extension+cppextension#torch.utils.cpp_extension.CppExtension) - ```python torch.utils.cpp_extension.CppExtension(name, sources, @@ -9,7 +8,6 @@ torch.utils.cpp_extension.CppExtension(name, ``` ### [paddle.utils.cpp_extension.CppExtension](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/utils/cpp_extension/CppExtension_cn.html) - ```python paddle.utils.cpp_extension.CppExtension(sources, *args, @@ -18,7 +16,6 @@ paddle.utils.cpp_extension.CppExtension(sources, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | name | - | 参数 name,Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.load.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.load.md index 349505f2d97..d9ffea183d9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.load.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.cpp_extension.load.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.utils.cpp_extension.load ### [torch.utils.cpp_extension.load](https://pytorch.org/docs/stable/cpp_extension.html?highlight=torch+utils+cpp_extension+load#torch.utils.cpp_extension.load) - ```python torch.utils.cpp_extension.load(name, sources, @@ -17,7 +16,6 @@ torch.utils.cpp_extension.load(name, ``` ### [paddle.utils.cpp_extension.load](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/utils/cpp_extension/load_cn.html) - ```python paddle.utils.cpp_extension.load(name, sources, @@ -31,7 +29,6 @@ paddle.utils.cpp_extension.load(name, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | name | name | 用于指定编译自定义 OP 时,生成的动态链接库的名字。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.DataLoader.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.DataLoader.md index 5a96fde4024..4bc660cdd66 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.DataLoader.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.DataLoader.md @@ -1,5 +1,4 @@ ## [ torch 参数更多 ]torch.utils.data.DataLoader - ### [torch.utils.data.DataLoader](https://pytorch.org/docs/stable/data.html?highlight=dataloader#torch.utils.data.DataLoader) ```python torch.utils.data.DataLoader(dataset, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.SubsetRandomSampler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.SubsetRandomSampler.md index cfb38f58e94..d1aca6edc52 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.SubsetRandomSampler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.SubsetRandomSampler.md @@ -1,13 +1,10 @@ -## [ torch 参数更多 ] torch.utils.data.SubsetRandomSampler - +## [ torch 参数更多 ]torch.utils.data.SubsetRandomSampler ### [torch.utils.data.SubsetRandomSampler](https://pytorch.org/docs/stable/data.html#torch.utils.data.SubsetRandomSampler) - ```python torch.utils.data.SubsetRandomSampler(indices, generator=None) ``` ### [paddle.io.SubsetRandomSampler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/SubsetRandomSampler_cn.html#paddle.io.SubsetRandomSampler) - ```python paddle.io.SubsetRandomSampler(indices) ``` @@ -15,7 +12,6 @@ paddle.io.SubsetRandomSampler(indices) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ----------- | ------------ | -------------------------------------------------------------------- | | indices | indices | 子集在原数据集中的索引序列,需要是 list 或者 tuple 类型。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.distributed.DistributedSampler.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.distributed.DistributedSampler.md index 4bea434c8e4..68cffc1ef80 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.distributed.DistributedSampler.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.utils.data.distributed.DistributedSampler.md @@ -1,6 +1,5 @@ ## [ torch 参数更多 ]torch.utils.data.distributed.DistributedSampler ### [torch.utils.data.distributed.DistributedSampler](https://docs.pytorch.org/docs/stable/data.html#torch.utils.data.distributed.DistributedSampler) - ```python torch.utils.data.distributed.DistributedSampler(dataset, num_replicas=None, @@ -11,7 +10,6 @@ torch.utils.data.distributed.DistributedSampler(dataset, ``` ### [paddle.io.DistributedBatchSampler](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/io/DistributedBatchSampler_cn.html#distributedbatchsampler) - ```python paddle.io.DistributedBatchSampler(dataset=None, batch_size, diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.vdot.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.vdot.md index 5786a99017b..af132122eca 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.vdot.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torch.vdot.md @@ -1,20 +1,16 @@ -## [torch 参数更多]torch.vdot - +## [ torch 参数更多 ]torch.vdot ### [torch.vdot](https://pytorch.org/docs/stable/generated/torch.vdot.html#torch.vdot) - ```python torch.vdot(input, other, *, out=None) ``` ### [paddle.dot](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/dot_cn.html#dot) - ```python paddle.dot(x, y, name=None) ``` torch 参数更多,具体如下: ### 参数映射 - | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | input | x | 输入的向量。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.datasets.ImageFolder.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.datasets.ImageFolder.md index 7477ed4068c..1133a7ea901 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.datasets.ImageFolder.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.datasets.ImageFolder.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torchvision.datasets.ImageFolder - +## [ torch 参数更多 ]torchvision.datasets.ImageFolder ### [torchvision.datasets.ImageFolder](https://pytorch.org/vision/main/generated/torchvision.datasets.ImageFolder.html) - ```python torchvision.datasets.ImageFolder(root: Union[str, pathlib.Path], transform: Optional[Callable] = None, @@ -12,7 +10,6 @@ torchvision.datasets.ImageFolder(root: Union[str, pathlib.Path], ``` ### [paddle.vision.datasets.ImageFolder](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/datasets/ImageFolder_cn.html) - ```python paddle.vision.datasets.ImageFolder(root: str, loader: Optional[Callable] = None, @@ -24,7 +21,6 @@ paddle.vision.datasets.ImageFolder(root: str, PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | -------------------------------- | ---------------------------------- | ----------------------------------------- | | root | root | 根目录路径。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.ops.RoIAlign.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.ops.RoIAlign.md index 9585a0629a9..51c1f9f9d41 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.ops.RoIAlign.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.ops.RoIAlign.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torchvision.ops.RoIAlign - +## [ torch 参数更多 ]torchvision.ops.RoIAlign ### [torchvision.ops.RoIAlign](https://pytorch.org/vision/main/generated/torchvision.ops.RoIAlign.html) - ```python torchvision.ops.RoIAlign(output_size: None, spatial_scale: float, sampling_ratio: int, aligned: bool = False) ``` ### [paddle.vision.ops.RoIAlign](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/ops/RoIAlign_cn.html) - ```python paddle.vision.ops.RoIAlign(output_size, spatial_scale=1.0) ``` @@ -15,7 +12,6 @@ paddle.vision.ops.RoIAlign(output_size, spatial_scale=1.0) PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------------------------------- | ------------------ | -------- | | output_size | output_size | 池化后输出的尺寸。| diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.transforms.Normalize.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.transforms.Normalize.md index c542002b946..00639d77fe9 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.transforms.Normalize.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.transforms.Normalize.md @@ -1,7 +1,5 @@ -## [torch 参数更多]torchvision.transforms.Normalize - +## [ torch 参数更多 ]torchvision.transforms.Normalize ### [torchvision.transforms.Normalize](https://pytorch.org/vision/main/generated/torchvision.transforms.Normalize.html) - ```python torchvision.transforms.Normalize( mean: Union[List[float], Tuple[float, ...]], @@ -11,7 +9,6 @@ torchvision.transforms.Normalize( ``` ### [paddle.vision.transforms.Normalize](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/vision/transforms/Normalize__upper_cn.html#normalize) - ```python paddle.vision.transforms.Normalize( mean: Union[int, float, List[float], Tuple[float, ...]] = 0.0, @@ -25,7 +22,6 @@ paddle.vision.transforms.Normalize( 两者功能一致,但 torchvision 支持更多参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | ------------ | -------------- | ---------------------- | | mean | mean | 用于每个通道归一化的均值。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.transforms.functional.normalize.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.transforms.functional.normalize.md index 79fabfa7565..a1a27c40f9a 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.transforms.functional.normalize.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/torchvision.transforms.functional.normalize.md @@ -1,13 +1,10 @@ -## [torch 参数更多]torchvision.transforms.functional.normalize - +## [ torch 参数更多 ]torchvision.transforms.functional.normalize ### [torchvision.transforms.functional.normalize](https://pytorch.org/vision/stable/generated/torchvision.transforms.functional.normalize.html) - ```python torchvision.transforms.functional.normalize(tensor, mean, std, inplace = False) ``` ### [paddle.vision.transforms.normalize](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/vision/transforms/normalize_cn.html) - ```python paddle.vision.transforms.normalize(img, mean = 0.0, std = 1.0, data_format = 'CHW', to_rgb = False) ``` @@ -15,7 +12,6 @@ paddle.vision.transforms.normalize(img, mean = 0.0, std = 1.0, data_format = 'CH PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | torchvision | PaddlePaddle | 备注 | | --------- | ---------- | ---------------------------------------------------- | | tensor | img | 用于归一化的数据,仅参数名不一致。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.AddedToken.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.AddedToken.md index 7f828763d9b..cf52c58401e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.AddedToken.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.AddedToken.md @@ -1,13 +1,10 @@ ## [ torch 参数更多 ]transformers.AddedToken - ### [transformers.AddedToken](https://github.com/huggingface/transformers/blob/d625294d79341662784495551abdf45e6cb9372f/src/transformers/tokenization_utils_base.py#L84) - ```python transformers.AddedToken(content: str, single_word=False, lstrip=False, rstrip=False, special=False, normalized=None) ``` ### [paddlenlp.transformers.AddedToken](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/transformers/tokenizer_utils_base.py#L48) - ```python paddlenlp.transformers.AddedToken(content: str = field(default_factory=str), single_word: bool = False, lstrip: bool = False, rstrip: bool = False, normalized: bool = True) ``` @@ -15,7 +12,6 @@ paddlenlp.transformers.AddedToken(content: str = field(default_factory=str), sin PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | transformers | PaddlePaddle | 备注 | | ------------ | ------------ | ---------------------- | | content | content | 待添加的 Token 内容。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.GenerationConfig.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.GenerationConfig.md index bba5f54ed5a..b1030f92a4d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.GenerationConfig.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.GenerationConfig.md @@ -1,13 +1,10 @@ -## [torch 参数更多]transformers.GenerationConfig - +## [ torch 参数更多 ]transformers.GenerationConfig ### [transformers.GenerationConfig](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/text_generation#transformers.GenerationConfig) - ```python transformers.GenerationConfig(*kwargs) ``` ### [paddlenlp.generation.GenerationConfig](https://github.com/PaddlePaddle/PaddleNLP/blob/e336e78c338d2514ee6c937982ce5d8c960b85ff/paddlenlp/generation/configuration_utils.py#L62) - ```python paddlenlp.generation.GenerationConfig(*kwargs) ``` @@ -15,7 +12,6 @@ paddlenlp.generation.GenerationConfig(*kwargs) 两者功能一致,但 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | transformers | PaddlePaddle | 备注 | | -------------------------------------| ------------------- | -------- | | max_length | max_length | 最大生成长度。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.PretrainedConfig.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.PretrainedConfig.md index d9da087e37a..1a5bc5f1f06 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.PretrainedConfig.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/torch_more_args/transformers.PretrainedConfig.md @@ -1,13 +1,10 @@ -## [torch 参数更多]transformers.PretrainedConfig - +## [ torch 参数更多 ]transformers.PretrainedConfig ### [transformers.PretrainedConfig](https://hf-mirror.com/docs/transformers/v4.42.0/en/main_classes/configuration#transformers.PretrainedConfig) - ```python transformers.PretrainedConfig(*kwargs) ``` ### [paddlenlp.transformers.PretrainedConfig](https://github.com/PaddlePaddle/PaddleNLP/blob/57000fa12ce67024238f0b56a6fde63c592c54ce/paddlenlp/transformers/configuration_utils.py#L317) - ```python paddlenlp.transformers.PretrainedConfig(*kwargs) ``` @@ -15,7 +12,6 @@ paddlenlp.transformers.PretrainedConfig(*kwargs) 两者功能一致,但 PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 - | transformers | PaddlePaddle | 备注 | | -------------------------------------| ------------------------------ | -------- | | name_or_path | name_or_path | 传递给 from_pretrained 的模型名称或模型所在路径。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_format_cn.md b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_format_cn.md index 6bf62381dfe..5c56759ddb3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_format_cn.md +++ b/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_format_cn.md @@ -196,7 +196,6 @@ paddle.nn.ZeroPad2D(padding, | - | data_format | 指定输入的 format, PyTorch 无此参数, Paddle 保持默认即可。 | - ## 分类 5:参数默认值不一致 ### [ 参数默认值不一致 ]torch.linalg.diagonal diff --git a/docs/guides/model_convert/convert_from_pytorch/tools/.gitignore b/docs/guides/model_convert/convert_from_pytorch/tools/.gitignore index ce0df2c5626..c70db3ca367 100644 --- a/docs/guides/model_convert/convert_from_pytorch/tools/.gitignore +++ b/docs/guides/model_convert/convert_from_pytorch/tools/.gitignore @@ -23,3 +23,4 @@ toc_warnings.txt unique_warnings.txt link_warnings.txt url_warnings.txt +api_difference_error.txt diff --git a/docs/guides/model_convert/convert_from_pytorch/tools/generate_pytorch_api_mapping.py b/docs/guides/model_convert/convert_from_pytorch/tools/generate_pytorch_api_mapping.py index fcdcd59159e..a6fefd220cf 100644 --- a/docs/guides/model_convert/convert_from_pytorch/tools/generate_pytorch_api_mapping.py +++ b/docs/guides/model_convert/convert_from_pytorch/tools/generate_pytorch_api_mapping.py @@ -111,7 +111,8 @@ def get_pytorch_url(torch_api: str) -> str: if any(torch_api.startswith(prefix) for prefix in generated_check): return f"{base_url}generated/{torch_api}.html" - return f"{base_url}torch.html#{torch_api}" + # return f"{base_url}torch.html#{torch_api}" + return f"{base_url}generated/{torch_api}.html" # 分割API路径 parts = torch_api.split(".") @@ -507,24 +508,6 @@ def generate_category2_table( used_apis.add(src_api) # 标记该API已处理 existing_apis.add(src_api) - # 遍历docs_mapping,查找mapping_type为"无参数"或"参数完全一致",且src_api替换后与dst_api不等的API - for src_api, item in docs_mapping.items(): - mapping_type = item.get("mapping_type", "") - dst_api = item.get("dst_api", "") - if ( - src_api in whitelist_skip - or src_api in no_need_convert_list - or src_api in used_apis - ): - continue - # 检查条件:mapping_type为"无参数"或"参数完全一致",src_api包含"torch",替换后与dst_api不等 - if mapping_type in ["无参数", "参数完全一致", "仅 API 调用方式不一致"]: - print(src_api) - - # 生成备注列的超链接 - # remark_link = get_mapping_doc_url(src_api, base_dir) - # rows.append((src_api, col2, col3, remark_link)) - # 生成Markdown表格字符串 table_lines = [ "| 序号 | Pytorch 最新 release | Paddle develop | 备注 |", diff --git a/docs/guides/model_convert/convert_from_pytorch/tools/validate_api_difference.py b/docs/guides/model_convert/convert_from_pytorch/tools/validate_api_difference.py index 2b7ecd7e8e3..1630ab23e9b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/tools/validate_api_difference.py +++ b/docs/guides/model_convert/convert_from_pytorch/tools/validate_api_difference.py @@ -1,597 +1,303 @@ -import argparse -import concurrent.futures import os -import random import re -import time -from collections import defaultdict -from urllib.parse import urlparse - -import requests -from requests.adapters import HTTPAdapter -from tqdm import tqdm # 用于显示进度条 -from urllib3.util.retry import Retry - -# 默认文件路径 -DEFAULT_FILE_PATH = "/workspace/paddleDocs/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md" - -USER_AGENT = "" - -# 重试策略配置 -RETRY_STRATEGY = Retry( - total=3, - backoff_factor=0.5, - status_forcelist=[429, 500, 502, 503, 504], - allowed_methods=["HEAD", "GET"], -) - - -def create_session(): - """创建带有重试机制的会话""" - session = requests.Session() - adapter = HTTPAdapter(max_retries=RETRY_STRATEGY) - session.mount("http://", adapter) - session.mount("https://", adapter) - return session - - -def parse_toc(lines): - """ - 解析目录表格,返回目录条目列表和结束行号 - """ - toc = [] - toc_end_line = -1 - in_toc = False - found_header = False - - for i, line in enumerate(lines): - line = line.strip() - - if line == "## API 映射分类": - in_toc = True - continue - - if in_toc: - if line.startswith("|") and "序号" in line and "类别" in line: - found_header = True - continue - if ( - found_header - and line.startswith("|") - and re.match(r"^\|?[-:\s|]+\|?$", line) - ): - continue # 跳过分隔行 - - if found_header and line.startswith("|"): - # 解析数据行 - columns = [col.strip() for col in line.split("|")[1:-1]] - if len(columns) >= 2: - toc.append((columns[0], columns[1])) # (序号, 类别名称) - else: - # 表格结束 - if found_header: - toc_end_line = i - break - return toc, toc_end_line - - -def parse_categories(lines): - """ - 解析类别部分,提取所有类别及其表格数据 - """ - categories = [] - current_category = None - current_table = [] - in_table = False - - for line in lines: - line = line.strip() - - # 检测类别标题 (## X. 类别名称) - category_match = re.match(r"^### (\d+)\. (.+)$", line) - if category_match: - # 保存前一个类别和表格 - if current_category is not None: - categories.append( - { - "id": current_category["id"], - "name": current_category["name"], - "table": current_table, - } - ) - - # 开始新类别 - current_category = { - "id": int(category_match.group(1)), - "name": category_match.group(2), - } - current_table = [] - in_table = False - continue - - # 检测表格开始 - if line.startswith("|") and "Pytorch" in line and "Paddle" in line: - in_table = True +def main(): + # 获取脚本所在目录 + script_dir = os.path.dirname(os.path.abspath(__file__)) + # API对比文档目录路径 + api_difference_dir = os.path.join(script_dir, "../api_difference") + + # 定义类别映射:英文目录名 -> 中文类别名称 + category_map = { + "invok_diff_only": "仅 API 调用方式不一致", + "args_name_diff": "仅参数名不一致", + "paddle_more_args": "paddle 参数更多", + "args_default_value_diff": "参数默认值不一致", + "torch_more_args": "torch 参数更多", + "input_args_usage_diff": "输入参数用法不一致", + "input_args_type_diff": "输入参数类型不一致", + "output_args_type_diff": "返回参数类型不一致", + "composite_implement": "组合替代实现", + } + + # 定义每个类别的总结语句 + summary_map = { + "invok_diff_only": "两者功能一致,但调用方式不一致,具体如下:", + "args_name_diff": "两者功能一致且参数用法一致,仅参数名不一致,具体如下:", + "paddle_more_args": "其中 Paddle 相比 PyTorch 支持更多其他参数,具体如下:", + "args_default_value_diff": "两者功能一致且参数用法一致,参数默认值不一致,具体如下:", + "torch_more_args": "PyTorch 相比 Paddle 支持更多其他参数,具体如下:", + "input_args_usage_diff": "其中 PyTorch 的输入参数与 Paddle 用法不一致,具体如下:", + "input_args_type_diff": "两者功能一致但参数类型不一致,具体如下:", + "output_args_type_diff": "两者功能一致但返回参数类型不同,具体如下:", + "composite_implement": "Paddle 无此 API,需要组合实现。", + } + + # 初始化统计变量 + total_files = 0 + valid_files = 0 + errors = [] + + # 遍历所有类别目录 + for category_dir in category_map: + category_path = os.path.join(api_difference_dir, category_dir) + if not os.path.isdir(category_path): continue - # 检测表格行 - if in_table and line.startswith("|"): - # 跳过表头分隔行 - if re.match(r"^\|?[-:\s|]+\|?$", line): + # 遍历目录下的所有.md文件 + for file_name in os.listdir(category_path): + if not file_name.endswith(".md"): continue - # 解析表格行 - columns = [col.strip() for col in line.split("|")[1:-1]] - if len(columns) >= 4: - current_table.append( - { - "index": columns[0], - "pytorch": columns[1], - "paddle": columns[2], - "note": columns[3] if len(columns) > 3 else "", - } - ) - continue - - # 检测表格结束 - if in_table and not line.startswith("|") and line != "": - in_table = False - - # 添加最后一个类别 - if current_category is not None: - categories.append( - { - "id": current_category["id"], - "name": current_category["name"], - "table": current_table, - } - ) - - return categories - - -def extract_links(text): - """ - 从文本中提取所有超链接 - """ - return re.findall(r"\[([^\]]+)\]\(([^)]+)\)", text) - - -def check_toc_consistency(toc, categories): - """ - 检查目录与类别标题的一致性 - """ - warnings = [] - - # 检查数量是否一致 - if len(toc) != len(categories): - warnings.append( - f"目录中有 {len(toc)} 个类别,但实际找到 {len(categories)} 个类别" - ) - - # 检查每个类别的序号和名称是否匹配 - for i, (toc_index, toc_name) in enumerate(toc): - if i >= len(categories): - break - - cat = categories[i] - if str(cat["id"]) != toc_index: - warnings.append( - f"目录中第 {i + 1} 个类别序号为 {toc_index},但实际类别序号为 {cat['id']}" - ) + total_files += 1 + file_path = os.path.join(category_path, file_name) + torch_api_name = file_name[:-3] # 去掉.md后缀 + + # 读取文件内容并移除空行 + try: + with open(file_path, "r", encoding="utf-8") as f: + lines = [line.strip() for line in f if line.strip() != ""] + lines = [line.replace(r"\_", "_") for line in lines] + except Exception as e: + errors.append(f"读取文件失败: {file_path} - {e!s}") + continue - if cat["name"] != toc_name: - warnings.append( - f"目录中第 {i + 1} 个类别名称为 '{toc_name}',但实际类别名称为 '{cat['name']}'" - ) + current_index = 0 + error_found = False - return warnings - - -def check_unique_torch_apis(categories): - """ - 检查 torch API 是否唯一 - """ - torch_apis = defaultdict(list) # api -> [category_ids] - - for category in categories: - for row in category["table"]: - links = extract_links(row["pytorch"]) - if links: - api_name = links[0][0] # 取第一个链接的文本作为 API 名称 - torch_apis[api_name].append(category["id"]) - - # 检查重复的 API - warnings = [] - for api, category_ids in torch_apis.items(): - if len(category_ids) > 1: - warning_msg = f"Torch API '{api}' 在多个类别中出现: {category_ids}" - warnings.append(warning_msg) - - return warnings - - -def check_links_exist(categories): - """ - 检查必要的超链接是否存在(根据新规则) - 规则: - 1. 第二列(Pytorch)必须有超链接 - 2. 第三列(Paddle): - - 对于"组合替代实现"、"可删除"、"功能缺失"类别,如果内容为空或"-"则不检查 - - 否则必须有超链接 - 3. 第四列(备注): 除了"API完全一致类别"(类别1)外,都需要有超链接 - """ - warnings = [] - - for category in categories: - category_id = category["id"] - category_name = category["name"] - - for i, row in enumerate(category["table"]): - row_num = i + 1 # 行号从1开始 - - # 1. 检查第二列 (Pytorch) 必须有超链接 - pytorch_links = extract_links(row["pytorch"]) - if not pytorch_links: - warning_msg = f"类别 {category_id}({category_name}) 第 {row_num} 行第二列缺少超链接: {row['pytorch']}" - warnings.append(warning_msg) - - # 2. 检查第三列 (Paddle) - paddle_content = row["paddle"].strip() - paddle_links = extract_links(row["paddle"]) - - # 特殊处理:组合替代实现、可删除、功能缺失 - special_cases = ["组合替代实现", "可删除", "功能缺失"] - is_special_case = any( - case in category_name for case in special_cases + # 1. 检查类别标题 (## [ 中文类别 ]torch_api_name) + expected_title = ( + f"## [ {category_map[category_dir]} ]{torch_api_name}" ) - - if is_special_case: - # 对于特殊类别,只有内容不为空且不是"-"时才检查链接 - if ( - paddle_content - and paddle_content != "-" - and not paddle_links - ): - warning_msg = f"类别 {category_id}({category_name}) 第 {row_num} 行第三列内容不为空但缺少超链接: {row['paddle']}" - warnings.append(warning_msg) - else: - # 对于其他类别,必须有超链接 - if not paddle_links: - warning_msg = f"类别 {category_id}({category_name}) 第 {row_num} 行第三列缺少超链接: {row['paddle']}" - warnings.append(warning_msg) - - # 3. 检查第四列 (备注) - note_links = extract_links(row["note"]) - note_content = row["note"].strip() - - # 除了类别1(API完全一致类别)外,都需要有超链接 if ( - category_id != 1 - and note_content - and note_content != "-" - and not note_links + current_index >= len(lines) + or lines[current_index] != expected_title ): - warning_msg = f"类别 {category_id}({category_name}) 第 {row_num} 行第四列缺少超链接: {row['note']}" - warnings.append(warning_msg) - - return warnings - - -def extract_all_urls(categories): - """ - 从所有类别中提取所有URL及其上下文信息 - """ - urls_with_context = [] - - for category in categories: - for row_idx, row in enumerate(category["table"]): - # 提取Pytorch列链接 - pytorch_links = extract_links(row["pytorch"]) - for link_text, url in pytorch_links: - urls_with_context.append( - { - "url": url, - "category_id": category["id"], - "category_name": category["name"], - "row_index": row_idx + 1, - "column": "Pytorch", - "context": f"{link_text} (类别 {category['id']}.{category['name']} 第 {row_idx + 1} 行)", - } - ) - - # 提取Paddle列链接 - paddle_links = extract_links(row["paddle"]) - for link_text, url in paddle_links: - urls_with_context.append( - { - "url": url, - "category_id": category["id"], - "category_name": category["name"], - "row_index": row_idx + 1, - "column": "Paddle", - "context": f"{link_text} (类别 {category['id']}.{category['name']} 第 {row_idx + 1} 行)", - } + error_found = True + errors.append( + f"文件格式错误: {file_path} - 第一行应为 '{expected_title}'" ) + current_index += 1 - # 提取Note列链接 - note_links = extract_links(row["note"]) - for link_text, url in note_links: - urls_with_context.append( - { - "url": url, - "category_id": category["id"], - "category_name": category["name"], - "row_index": row_idx + 1, - "column": "Note", - "context": f"{link_text} (类别 {category['id']}.{category['name']} 第 {row_idx + 1} 行)", - } + # 2. 检查torch超链接 (### [torch_api_name](url)) + if current_index >= len(lines) or not re.match( + r"^### \[" + re.escape(torch_api_name) + r"\]\(.*\)$", + lines[current_index], + ): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 第二行应为torch超链接" ) + current_index += 1 - return urls_with_context - - -def is_valid_url(url): - """ - 检查URL是否有效 - """ - try: - result = urlparse(url) - return all([result.scheme, result.netloc]) - except ValueError: - return False - - -def check_url_exists(url_info, session=None): - """ - 检查URL是否存在(是否返回404) - 返回状态码和错误信息 - """ - url = url_info["url"] - - # 检查URL是否有效 - if not is_valid_url(url): - return { - "status": "invalid", - "status_code": None, - "error": "无效的URL格式", - "url_info": url_info, - } - - # 添加随机延迟,避免请求过于频繁 - time.sleep(random.uniform(0.5, 1.5)) - - # 创建会话(如果未提供) - if session is None: - session = create_session() - - try: - # 发送HEAD请求(更快,节省带宽) - response = session.head(url, timeout=10, allow_redirects=True) - status_code = response.status_code - - # 如果HEAD请求不被支持(405错误),则尝试GET请求 - if status_code == 405: - response = session.get(url, timeout=10, allow_redirects=True) - status_code = response.status_code - - # 根据状态码判断URL是否存在 - if status_code == 200: - return { - "status": "ok", - "status_code": status_code, - "error": None, - "url_info": url_info, - } - elif status_code == 404: - return { - "status": "not_found", - "status_code": status_code, - "error": "页面不存在", - "url_info": url_info, - } - elif 400 <= status_code < 500: - return { - "status": "client_error", - "status_code": status_code, - "error": "客户端错误", - "url_info": url_info, - } - elif 500 <= status_code < 600: - return { - "status": "server_error", - "status_code": status_code, - "error": "服务器错误", - "url_info": url_info, - } - else: - return { - "status": "other_error", - "status_code": status_code, - "error": f"HTTP状态码: {status_code}", - "url_info": url_info, - } - - except requests.exceptions.RequestException as e: - return { - "status": "request_error", - "status_code": None, - "error": str(e), - "url_info": url_info, - } - - -def check_urls_exist(urls_with_context, max_workers=10): - """ - 使用多线程检查所有URL是否存在(是否返回404) - 返回警告列表 - """ - warnings = [] - - urls_with_context = urls_with_context[-700:] - - total_urls = len(urls_with_context) - - print( - f"开始使用多线程检查 {total_urls} 个URL的存在性(线程数:{max_workers})..." - ) - - with ( - tqdm(total=total_urls, desc="检查URL") as pbar, - concurrent.futures.ThreadPoolExecutor( - max_workers=max_workers - ) as executor, - ): - # 为每个线程创建一个会话 - sessions = [create_session() for _ in range(max_workers)] - - # 提交所有任务 - future_to_url = {} - for i, url_info in enumerate(urls_with_context): - # 分配会话给任务(轮询方式) - session = sessions[i % max_workers] - future = executor.submit(check_url_exists, url_info, session) - future_to_url[future] = url_info - - # 处理完成的任务 - for future in concurrent.futures.as_completed(future_to_url): - result = future.result() - - # 更新进度条 - pbar.update(1) - - # 如果不是200状态码,则添加到警告列表 - if result["status"] != "ok": - warning_msg = ( - f"URL访问错误: {result['error']}\n" - f"URL: {result['url_info']['url']}\n" - f"上下文: {result['url_info']['context']}\n" + # 3. 检查torch代码块开始 (```python) + if ( + current_index >= len(lines) + or lines[current_index] != "```python" + ): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 第三行应为'```python'" ) - if result["status_code"]: - warning_msg += f"状态码: {result['status_code']}\n" - warnings.append(warning_msg) + current_index += 1 + + while lines[current_index] != "```": + current_index += 1 + if current_index >= len(lines): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 未找到torch代码块结束'```'" + ) + break + current_index += 1 - # 关闭所有会话 - for session in sessions: - session.close() + # 6. 检查paddle部分 (非组合实现类别) + if category_dir != "composite_implement": + # 6.1 paddle超链接 + if current_index >= len(lines) or not re.match( + r"^### \[.*\]\(.*\)$", lines[current_index] + ): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 第六行应为paddle超链接" + ) + current_index += 1 - print(f"URL检查完成,发现 {len(warnings)} 个问题") - return warnings + # 6.2 paddle代码块开始 + if ( + current_index >= len(lines) + or lines[current_index] != "```python" + ): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 第七行应为'```python'" + ) + current_index += 1 + + while lines[current_index] != "```": + current_index += 1 + if current_index >= len(lines): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 未找到'```'" + ) + break + current_index += 1 + + # 7. 检查总结行 + expected_summary = summary_map[category_dir] + # if current_index >= len(lines) or lines[current_index] != expected_summary: + # error_found = True + # errors.append(f"文件格式错误: {file_path} - 总结行应为 '{expected_summary}'") + while current_index < len(lines) and not lines[ + current_index + ].startswith("#"): + current_index += 1 + + # 8. 检查参数映射表格 (非2和10类) + if category_dir not in ["invok_diff_only", "composite_implement"]: + # 8.1 参数映射标题 + if ( + current_index >= len(lines) + or lines[current_index] != "### 参数映射" + ): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 缺少'### 参数映射'标题" + ) + current_index += 1 + + while ( + current_index < len(lines) and "|" in lines[current_index] + ): + current_index += 1 + # 9. 检查转写示例 + if category_dir in ["invok_diff_only", "composite_implement"]: + # 9.1 转写示例标题 + if ( + current_index >= len(lines) + or lines[current_index] != "### 转写示例" + ): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 缺少'### 转写示例'" + ) + current_index += 1 -def main(): - parser = argparse.ArgumentParser(description="Markdown 文件校验工具") - parser.add_argument( - "--file", - "-f", - help="要校验的 Markdown 文件路径", - default=DEFAULT_FILE_PATH, - ) - parser.add_argument( - "--skip-url-check", - action="store_true", - help="跳过URL存在性检查(避免网络请求)", - ) - - args = parser.parse_args() - - current_script_path = os.path.abspath(__file__) - tools_dir = os.path.dirname(current_script_path) - base_dir = os.path.dirname(tools_dir) # 上一级目录 - - # 确定要校验的文件路径 - if args.file: - md_file_path = os.path.abspath(args.file) - else: - # 默认文件路径:上一级目录中的 pytorch_api_mapping_cn.md - md_file_path = os.path.join(base_dir, "pytorch_api_mapping_cn.md") - - # 检查文件是否存在 - if not os.path.exists(md_file_path): - print(f"错误: 文件 '{md_file_path}' 不存在") - print("请使用 --file 参数指定文件路径") - return - - # 读取文件所有行 - try: - with open(md_file_path, "r", encoding="utf-8") as f: - lines = f.readlines() - except Exception as e: - print(f"错误: 读取文件 '{md_file_path}' 时出错: {e!s}") - return - - # 解析目录表格 - toc, toc_end_line = parse_toc(lines) - - # 解析类别部分(从目录结束行之后开始) - if toc_end_line != -1: - category_lines = lines[toc_end_line + 1 :] - else: - category_lines = lines - categories = parse_categories(category_lines) - - print(f"正在校验文件: {md_file_path}") - print(f"找到 {len(toc)} 个目录条目") - print(f"找到 {len(categories)} 个类别") - - # 执行三个基本校验 - toc_warnings = check_toc_consistency(toc, categories) - unique_warnings = check_unique_torch_apis(categories) - link_warnings = check_links_exist(categories) - - # 输出警告到文件 - if toc_warnings: - output_path = os.path.join(tools_dir, "toc_warnings.txt") - with open(output_path, "w", encoding="utf-8") as f: - f.write("目录一致性校验警告:\n") - f.writelines(warning + "\n" for warning in toc_warnings) - print(f"生成 {output_path},包含 {len(toc_warnings)} 个警告") - - if unique_warnings: - output_path = os.path.join(tools_dir, "unique_warnings.txt") - with open(output_path, "w", encoding="utf-8") as f: - f.write("Torch API 唯一性校验警告:\n") - f.writelines(warning + "\n" for warning in unique_warnings) - print(f"生成 {output_path},包含 {len(unique_warnings)} 个警告") - - if link_warnings: - output_path = os.path.join(tools_dir, "link_warnings.txt") - with open(output_path, "w", encoding="utf-8") as f: - f.write("超链接存在性校验警告:\n") - f.writelines(warning + "\n" for warning in link_warnings) - print(f"生成 {output_path},包含 {len(link_warnings)} 个警告") - - # 执行URL存在性检查(除非明确跳过) - url_warnings = [] - if not args.skip_url_check: - # 提取所有URL - urls_with_context = extract_all_urls(categories) - print(f"找到 {len(urls_with_context)} 个URL需要检查") - - # 检查URL存在性(使用多线程) - url_warnings = check_urls_exist( - urls_with_context, max(os.cpu_count() - 4, 1) - ) - - if url_warnings: - output_path = os.path.join(tools_dir, "url_warnings.txt") - with open(output_path, "w", encoding="utf-8") as f: - f.write("URL存在性校验警告:\n") - f.writelines(warning + "\n" for warning in url_warnings) - print(f"生成 {output_path},包含 {len(url_warnings)} 个警告") - else: - print("跳过URL存在性检查") - - # 如果没有警告,输出成功信息 - if ( - not toc_warnings - and not unique_warnings - and not link_warnings - and not url_warnings - ): - print("所有校验通过,没有发现警告!") + # 9.2 转写示例代码块 + if ( + current_index >= len(lines) + or lines[current_index] != "```python" + ): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 转写示例代码块开始错误" + ) + current_index += 1 + + # 9.3 转写内容 (必须包含PyTorch和Paddle示例) + # if current_index + 1 >= len(lines): + # error_found = True + # errors.append(f"文件格式错误: {file_path} - 转写示例内容缺失") + # else: + # pytorch_line = lines[current_index] + # paddle_line = lines[current_index + 1] + # if not ('# PyTorch' in pytorch_line and '# Paddle' in paddle_line): + # error_found = True + # errors.append(f"文件格式错误: {file_path} - 转写示例内容缺失PyTorch/Paddle标记") + + # # 检查内容中不能包含四级标题 + # if '####' in pytorch_line or '####' in paddle_line: + # error_found = True + # errors.append(f"文件格式错误: {file_path} - 转写示例内容不应包含四级标题") + + while ( + current_index < len(lines) and lines[current_index] != "```" + ): + current_index += 1 + if current_index >= len(lines): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 未找到'```'" + ) + break + if "####" in lines[current_index]: + error_found = True + errors.append( + f"文件格式错误: {file_path} - 转写示例内容不应包含四级标题" + ) + + current_index += 1 + + elif category_dir in [ + "torch_more_args", + "input_args_usage_diff", + "input_args_type_diff", + "output_args_type_diff", + "paddle_more_args", + "args_default_value_diff", + ]: + # 9.1 转写示例标题 + if ( + current_index >= len(lines) + or lines[current_index] != "### 转写示例" + ): + if category_dir not in [ + "paddle_more_args", + "args_default_value_diff", + ]: + error_found = True + errors.append( + f"文件格式错误: {file_path} - 缺少'### 转写示例'" + ) + current_index += 1 + + # 9.2 检查至少一个四级标题 (####) + found_4th_level = False + for i in range(current_index, len(lines)): + if lines[i].startswith("####"): + found_4th_level = True + break + if not found_4th_level: + if category_dir not in [ + "paddle_more_args", + "args_default_value_diff", + ]: + error_found = True + errors.append( + f"文件格式错误: {file_path} - 转写示例应包含至少一个四级标题" + ) + + else: # 类别3: args_name_diff + # 检查不应存在转写示例 + if ( + current_index < len(lines) + and lines[current_index] == "### 转写示例" + ): + error_found = True + errors.append( + f"文件格式错误: {file_path} - 类别3不应包含'### 转写示例'" + ) + + # 更新有效文件计数 + if not error_found: + valid_files += 1 + + # 输出统计信息 + print(f"总文件数: {total_files}") + print(f"有效文件数: {valid_files}") + print(f"通过率: {valid_files / total_files:.2%}") + + # 保存错误信息到文件 + error_file = os.path.join(script_dir, "api_difference_error.txt") + with open(error_file, "w", encoding="utf-8") as f: + f.writelines(error + "\n" for error in errors) + + # 如果没有错误,删除错误文件 + if not errors: + os.remove(error_file) if __name__ == "__main__": diff --git a/docs/guides/model_convert/convert_from_pytorch/tools/validate_pytorch_api_mapping.py b/docs/guides/model_convert/convert_from_pytorch/tools/validate_pytorch_api_mapping.py new file mode 100644 index 00000000000..0066d839abe --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/tools/validate_pytorch_api_mapping.py @@ -0,0 +1,598 @@ +import argparse +import concurrent.futures +import os +import random +import re +import time +from collections import defaultdict +from urllib.parse import urlparse + +import requests +from requests.adapters import HTTPAdapter +from tqdm import tqdm # 用于显示进度条 +from urllib3.util.retry import Retry + +# 默认文件路径 +DEFAULT_FILE_PATH = "/workspace/paddleDocs/docs/guides/model_convert/convert_from_pytorch/pytorch_api_mapping_cn.md" + +USER_AGENT = "" + +# 重试策略配置 +RETRY_STRATEGY = Retry( + total=3, + backoff_factor=0.5, + status_forcelist=[429, 500, 502, 503, 504], + allowed_methods=["HEAD", "GET"], +) + + +def create_session(): + """创建带有重试机制的会话""" + session = requests.Session() + adapter = HTTPAdapter(max_retries=RETRY_STRATEGY) + session.mount("http://", adapter) + session.mount("https://", adapter) + return session + + +def parse_toc(lines): + """ + 解析目录表格,返回目录条目列表和结束行号 + """ + toc = [] + toc_end_line = -1 + in_toc = False + found_header = False + + for i, line in enumerate(lines): + line = line.strip() + + if line == "## API 映射分类": + in_toc = True + continue + + if in_toc: + if line.startswith("|") and "序号" in line and "类别" in line: + found_header = True + continue + + if ( + found_header + and line.startswith("|") + and re.match(r"^\|?[-:\s|]+\|?$", line) + ): + continue # 跳过分隔行 + + if found_header and line.startswith("|"): + # 解析数据行 + columns = [col.strip() for col in line.split("|")[1:-1]] + if len(columns) >= 2: + toc.append((columns[0], columns[1])) # (序号, 类别名称) + else: + # 表格结束 + if found_header: + toc_end_line = i + break + + return toc, toc_end_line + + +def parse_categories(lines): + """ + 解析类别部分,提取所有类别及其表格数据 + """ + categories = [] + current_category = None + current_table = [] + in_table = False + + for line in lines: + line = line.strip() + + # 检测类别标题 (## X. 类别名称) + category_match = re.match(r"^### (\d+)\. (.+)$", line) + if category_match: + # 保存前一个类别和表格 + if current_category is not None: + categories.append( + { + "id": current_category["id"], + "name": current_category["name"], + "table": current_table, + } + ) + + # 开始新类别 + current_category = { + "id": int(category_match.group(1)), + "name": category_match.group(2), + } + current_table = [] + in_table = False + continue + + # 检测表格开始 + if line.startswith("|") and "Pytorch" in line and "Paddle" in line: + in_table = True + continue + + # 检测表格行 + if in_table and line.startswith("|"): + # 跳过表头分隔行 + if re.match(r"^\|?[-:\s|]+\|?$", line): + continue + + # 解析表格行 + columns = [col.strip() for col in line.split("|")[1:-1]] + if len(columns) >= 4: + current_table.append( + { + "index": columns[0], + "pytorch": columns[1], + "paddle": columns[2], + "note": columns[3] if len(columns) > 3 else "", + } + ) + continue + + # 检测表格结束 + if in_table and not line.startswith("|") and line != "": + in_table = False + + # 添加最后一个类别 + if current_category is not None: + categories.append( + { + "id": current_category["id"], + "name": current_category["name"], + "table": current_table, + } + ) + + return categories + + +def extract_links(text): + """ + 从文本中提取所有超链接 + """ + return re.findall(r"\[([^\]]+)\]\(([^)]+)\)", text) + + +def check_toc_consistency(toc, categories): + """ + 检查目录与类别标题的一致性 + """ + warnings = [] + + # 检查数量是否一致 + if len(toc) != len(categories): + warnings.append( + f"目录中有 {len(toc)} 个类别,但实际找到 {len(categories)} 个类别" + ) + + # 检查每个类别的序号和名称是否匹配 + for i, (toc_index, toc_name) in enumerate(toc): + if i >= len(categories): + break + + cat = categories[i] + if str(cat["id"]) != toc_index: + warnings.append( + f"目录中第 {i + 1} 个类别序号为 {toc_index},但实际类别序号为 {cat['id']}" + ) + + if cat["name"] != toc_name: + warnings.append( + f"目录中第 {i + 1} 个类别名称为 '{toc_name}',但实际类别名称为 '{cat['name']}'" + ) + + return warnings + + +def check_unique_torch_apis(categories): + """ + 检查 torch API 是否唯一 + """ + torch_apis = defaultdict(list) # api -> [category_ids] + + for category in categories: + for row in category["table"]: + links = extract_links(row["pytorch"]) + if links: + api_name = links[0][0] # 取第一个链接的文本作为 API 名称 + torch_apis[api_name].append(category["id"]) + + # 检查重复的 API + warnings = [] + for api, category_ids in torch_apis.items(): + if len(category_ids) > 1: + warning_msg = f"Torch API '{api}' 在多个类别中出现: {category_ids}" + warnings.append(warning_msg) + + return warnings + + +def check_links_exist(categories): + """ + 检查必要的超链接是否存在(根据新规则) + 规则: + 1. 第二列(Pytorch)必须有超链接 + 2. 第三列(Paddle): + - 对于"组合替代实现"、"可删除"、"功能缺失"类别,如果内容为空或"-"则不检查 + - 否则必须有超链接 + 3. 第四列(备注): 除了"API完全一致类别"(类别1)外,都需要有超链接 + """ + warnings = [] + + for category in categories: + category_id = category["id"] + category_name = category["name"] + + for i, row in enumerate(category["table"]): + row_num = i + 1 # 行号从1开始 + + # 1. 检查第二列 (Pytorch) 必须有超链接 + pytorch_links = extract_links(row["pytorch"]) + if not pytorch_links: + warning_msg = f"类别 {category_id}({category_name}) 第 {row_num} 行第二列缺少超链接: {row['pytorch']}" + warnings.append(warning_msg) + + # 2. 检查第三列 (Paddle) + paddle_content = row["paddle"].strip() + paddle_links = extract_links(row["paddle"]) + + # 特殊处理:组合替代实现、可删除、功能缺失 + special_cases = ["组合替代实现", "可删除", "功能缺失"] + is_special_case = any( + case in category_name for case in special_cases + ) + + if is_special_case: + # 对于特殊类别,只有内容不为空且不是"-"时才检查链接 + if ( + paddle_content + and paddle_content != "-" + and not paddle_links + ): + warning_msg = f"类别 {category_id}({category_name}) 第 {row_num} 行第三列内容不为空但缺少超链接: {row['paddle']}" + warnings.append(warning_msg) + else: + # 对于其他类别,必须有超链接 + if not paddle_links: + warning_msg = f"类别 {category_id}({category_name}) 第 {row_num} 行第三列缺少超链接: {row['paddle']}" + warnings.append(warning_msg) + + # 3. 检查第四列 (备注) + note_links = extract_links(row["note"]) + note_content = row["note"].strip() + + # 除了类别1(API完全一致类别)外,都需要有超链接 + if ( + category_id != 1 + and note_content + and note_content != "-" + and not note_links + ): + warning_msg = f"类别 {category_id}({category_name}) 第 {row_num} 行第四列缺少超链接: {row['note']}" + warnings.append(warning_msg) + + return warnings + + +def extract_all_urls(categories): + """ + 从所有类别中提取所有URL及其上下文信息 + """ + urls_with_context = [] + + for category in categories: + for row_idx, row in enumerate(category["table"]): + # 提取Pytorch列链接 + pytorch_links = extract_links(row["pytorch"]) + for link_text, url in pytorch_links: + urls_with_context.append( + { + "url": url, + "category_id": category["id"], + "category_name": category["name"], + "row_index": row_idx + 1, + "column": "Pytorch", + "context": f"{link_text} (类别 {category['id']}.{category['name']} 第 {row_idx + 1} 行)", + } + ) + + # 提取Paddle列链接 + paddle_links = extract_links(row["paddle"]) + for link_text, url in paddle_links: + urls_with_context.append( + { + "url": url, + "category_id": category["id"], + "category_name": category["name"], + "row_index": row_idx + 1, + "column": "Paddle", + "context": f"{link_text} (类别 {category['id']}.{category['name']} 第 {row_idx + 1} 行)", + } + ) + + # 提取Note列链接 + note_links = extract_links(row["note"]) + for link_text, url in note_links: + urls_with_context.append( + { + "url": url, + "category_id": category["id"], + "category_name": category["name"], + "row_index": row_idx + 1, + "column": "Note", + "context": f"{link_text} (类别 {category['id']}.{category['name']} 第 {row_idx + 1} 行)", + } + ) + + return urls_with_context + + +def is_valid_url(url): + """ + 检查URL是否有效 + """ + try: + result = urlparse(url) + return all([result.scheme, result.netloc]) + except ValueError: + return False + + +def check_url_exists(url_info, session=None): + """ + 检查URL是否存在(是否返回404) + 返回状态码和错误信息 + """ + url = url_info["url"] + + # 检查URL是否有效 + if not is_valid_url(url): + return { + "status": "invalid", + "status_code": None, + "error": "无效的URL格式", + "url_info": url_info, + } + + # 添加随机延迟,避免请求过于频繁 + time.sleep(random.uniform(0.5, 1.5)) + + # 创建会话(如果未提供) + if session is None: + session = create_session() + + try: + # 发送HEAD请求(更快,节省带宽) + response = session.head(url, timeout=10, allow_redirects=True) + status_code = response.status_code + + # 如果HEAD请求不被支持(405错误),则尝试GET请求 + if status_code == 405: + response = session.get(url, timeout=10, allow_redirects=True) + status_code = response.status_code + + # 根据状态码判断URL是否存在 + if status_code == 200: + return { + "status": "ok", + "status_code": status_code, + "error": None, + "url_info": url_info, + } + elif status_code == 404: + return { + "status": "not_found", + "status_code": status_code, + "error": "页面不存在", + "url_info": url_info, + } + elif 400 <= status_code < 500: + return { + "status": "client_error", + "status_code": status_code, + "error": "客户端错误", + "url_info": url_info, + } + elif 500 <= status_code < 600: + return { + "status": "server_error", + "status_code": status_code, + "error": "服务器错误", + "url_info": url_info, + } + else: + return { + "status": "other_error", + "status_code": status_code, + "error": f"HTTP状态码: {status_code}", + "url_info": url_info, + } + + except requests.exceptions.RequestException as e: + return { + "status": "request_error", + "status_code": None, + "error": str(e), + "url_info": url_info, + } + + +def check_urls_exist(urls_with_context, max_workers=10): + """ + 使用多线程检查所有URL是否存在(是否返回404) + 返回警告列表 + """ + warnings = [] + + urls_with_context = urls_with_context[:600] + + total_urls = len(urls_with_context) + + print( + f"开始使用多线程检查 {total_urls} 个URL的存在性(线程数:{max_workers})..." + ) + + with ( + tqdm(total=total_urls, desc="检查URL") as pbar, + concurrent.futures.ThreadPoolExecutor( + max_workers=max_workers + ) as executor, + ): + # 为每个线程创建一个会话 + sessions = [create_session() for _ in range(max_workers)] + + # 提交所有任务 + future_to_url = {} + for i, url_info in enumerate(urls_with_context): + # 分配会话给任务(轮询方式) + session = sessions[i % max_workers] + future = executor.submit(check_url_exists, url_info, session) + future_to_url[future] = url_info + + # 处理完成的任务 + for future in concurrent.futures.as_completed(future_to_url): + result = future.result() + + # 更新进度条 + pbar.update(1) + + # 如果不是200状态码,则添加到警告列表 + if result["status"] != "ok": + warning_msg = ( + f"URL访问错误: {result['error']}\n" + f"URL: {result['url_info']['url']}\n" + f"上下文: {result['url_info']['context']}\n" + ) + if result["status_code"]: + warning_msg += f"状态码: {result['status_code']}\n" + warnings.append(warning_msg) + + # 关闭所有会话 + for session in sessions: + session.close() + + print(f"URL检查完成,发现 {len(warnings)} 个问题") + return warnings + + +def main(): + parser = argparse.ArgumentParser(description="Markdown 文件校验工具") + parser.add_argument( + "--file", + "-f", + help="要校验的 Markdown 文件路径", + default=DEFAULT_FILE_PATH, + ) + parser.add_argument( + "--skip-url-check", + action="store_true", + help="跳过URL存在性检查(避免网络请求)", + ) + + args = parser.parse_args() + + current_script_path = os.path.abspath(__file__) + tools_dir = os.path.dirname(current_script_path) + base_dir = os.path.dirname(tools_dir) # 上一级目录 + + # 确定要校验的文件路径 + if args.file: + md_file_path = os.path.abspath(args.file) + else: + # 默认文件路径:上一级目录中的 pytorch_api_mapping_cn.md + md_file_path = os.path.join(base_dir, "pytorch_api_mapping_cn.md") + + # 检查文件是否存在 + if not os.path.exists(md_file_path): + print(f"错误: 文件 '{md_file_path}' 不存在") + print("请使用 --file 参数指定文件路径") + return + + # 读取文件所有行 + try: + with open(md_file_path, "r", encoding="utf-8") as f: + lines = f.readlines() + except Exception as e: + print(f"错误: 读取文件 '{md_file_path}' 时出错: {e!s}") + return + + # 解析目录表格 + toc, toc_end_line = parse_toc(lines) + + # 解析类别部分(从目录结束行之后开始) + if toc_end_line != -1: + category_lines = lines[toc_end_line + 1 :] + else: + category_lines = lines + categories = parse_categories(category_lines) + + print(f"正在校验文件: {md_file_path}") + print(f"找到 {len(toc)} 个目录条目") + print(f"找到 {len(categories)} 个类别") + + # 执行三个基本校验 + toc_warnings = check_toc_consistency(toc, categories) + unique_warnings = check_unique_torch_apis(categories) + link_warnings = check_links_exist(categories) + + # 输出警告到文件 + if toc_warnings: + output_path = os.path.join(tools_dir, "toc_warnings.txt") + with open(output_path, "w", encoding="utf-8") as f: + f.write("目录一致性校验警告:\n") + f.writelines(warning + "\n" for warning in toc_warnings) + print(f"生成 {output_path},包含 {len(toc_warnings)} 个警告") + + if unique_warnings: + output_path = os.path.join(tools_dir, "unique_warnings.txt") + with open(output_path, "w", encoding="utf-8") as f: + f.write("Torch API 唯一性校验警告:\n") + f.writelines(warning + "\n" for warning in unique_warnings) + print(f"生成 {output_path},包含 {len(unique_warnings)} 个警告") + + if link_warnings: + output_path = os.path.join(tools_dir, "link_warnings.txt") + with open(output_path, "w", encoding="utf-8") as f: + f.write("超链接存在性校验警告:\n") + f.writelines(warning + "\n" for warning in link_warnings) + print(f"生成 {output_path},包含 {len(link_warnings)} 个警告") + + # 执行URL存在性检查(除非明确跳过) + url_warnings = [] + if not args.skip_url_check: + # 提取所有URL + urls_with_context = extract_all_urls(categories) + print(f"找到 {len(urls_with_context)} 个URL需要检查") + + # 检查URL存在性(使用多线程) + url_warnings = check_urls_exist( + urls_with_context, max(os.cpu_count() - 4, 1) + ) + + if url_warnings: + output_path = os.path.join(tools_dir, "url_warnings.txt") + with open(output_path, "w", encoding="utf-8") as f: + f.write("URL存在性校验警告:\n") + f.writelines(warning + "\n" for warning in url_warnings) + print(f"生成 {output_path},包含 {len(url_warnings)} 个警告") + else: + print("跳过URL存在性检查") + + # 如果没有警告,输出成功信息 + if ( + not toc_warnings + and not unique_warnings + and not link_warnings + and not url_warnings + ): + print("所有校验通过,没有发现警告!") + + +if __name__ == "__main__": + main()