From e6a04b889c6165ae78575aae7f68fe320f9464ca Mon Sep 17 00:00:00 2001 From: RedContritio Date: Fri, 8 Mar 2024 15:37:25 +0800 Subject: [PATCH] update incorrect desc --- .../functional/torch.nn.functional.embedding.md | 4 ++-- .../functional/torch.nn.functional.multi_margin_loss.md | 2 +- .../torch.nn.functional.multilabel_soft_margin_loss.md | 2 +- .../convert_from_pytorch/api_difference/ops/torch.mode.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.embedding.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.embedding.md index 0b816528924..4e3a22d1de6 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.embedding.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.embedding.md @@ -1,4 +1,4 @@ -## [ 参数不一致 ]torch.nn.functional.embedding +## [torch 参数]torch.nn.functional.embedding ### [torch.nn.functional.embedding](https://pytorch.org/docs/stable/generated/torch.nn.functional.embedding.html) @@ -12,7 +12,7 @@ torch.nn.functional.embedding(input, weight, padding_idx=None, max_norm=None, no paddle.nn.functional.embedding(x, weight, padding_idx=None, sparse=False, name=None) ``` -其中 PyTorch 和 Paddle 功能一致,仅参数名不一致,具体如下: +PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 参数映射 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multi_margin_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multi_margin_loss.md index 448f318db7b..d2a370a9917 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multi_margin_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multi_margin_loss.md @@ -18,7 +18,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -- | -| input | input | 输入 Tensor,仅参数名不一致。 | +| input | input | 输入 Tensor。 | | target | label | 标签 Tensor,仅参数名不一致。 | | p | p | 手动指定范数。| | margin | margin | 手动指定间距。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multilabel_soft_margin_loss.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multilabel_soft_margin_loss.md index 6e0758a8e69..57889db47ad 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multilabel_soft_margin_loss.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multilabel_soft_margin_loss.md @@ -18,7 +18,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------ | ------------ | -- | -| input | input | 输入 Tensor,仅参数名不一致。 | +| input | input | 输入 Tensor。 | | target | label | 标签 Tensor,仅参数名不一致。 | | weight | weight | 手动指定每个 batch 二值交叉熵的权重。 | | size_average | - | PyTorch 已弃用, Paddle 无此参数,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.mode.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.mode.md index 8d79c5de9d7..47888fd80a8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.mode.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.mode.md @@ -18,7 +18,7 @@ paddle.mode(x, axis=-1, keepdim=False, name=None) | PyTorch | PaddlePaddle | 备注 | | ------- | ------------ | -- | -| input | x | 输入的多维 Tensor。 | +| input | x | 输入的多维 Tensor,仅参数名不一致。 | | dim | axis | 指定对输入 Tensor 进行运算的轴,仅参数名不一致。 | | keepdim | keepdim | 是否保留指定的轴。 | | out | - | 表示输出的 Tensor , Paddle 无此参数,需要转写。 | @@ -31,5 +31,5 @@ torch.mode(x, dim, False, out=(a, b)) # Paddle 写法 out1, out2 = paddle.mode(x, dim, False) -paddle.assign(out1, (a, b)[0]), paddle.assign(out2, (a, b)[1]) +paddle.assign(out1, a), paddle.assign(out2, b) ```