-
Notifications
You must be signed in to change notification settings - Fork 869
【映射文档】新增与维护部分映射文档 #6494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【映射文档】新增与维护部分映射文档 #6494
Conversation
32669cc
to
b7d254c
Compare
71e0e99
to
9609972
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意内容详细得当,这个文档的核心是 突出torch->paddle的差异,其他无差异的地方应省尽省
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.addmm.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.addmm.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.amax.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.amin.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.argmax.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.amax.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.alpha_dropout.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.amin.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.amin.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.angle.md
Outdated
Show resolved
Hide resolved
607124c
to
adef7f6
Compare
adef7f6
to
c2956af
Compare
后面可以考虑进一步规范,但是历史存量修改问题会比较多 |
| mat1 | x | 表示输入的 Tensor,仅参数名不一致。 | | ||
| mat2 | y | 表示输入的 Tensor,仅参数名不一致。 | | ||
| beta | beta | 乘以 input 的标量。| | ||
| alpha | alpha | 乘以 x*y 的标量。| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是乘以x还是乘以y?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
反馈,参考 paddle.addmm,out=alpha∗x∗y+beta∗input
,乘以 x*y
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.logit.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.matmul.md
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/Tensor/torch.Tensor.matmul.md
Outdated
Show resolved
Hide resolved
### [paddle.Tensor.matmul](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/Tensor_cn.html#matmul-y-transpose-x-false-transpose-y-false-name-none) | ||
|
||
```python | ||
paddle.Tensor.matmul(y, transpose_x=False, transpose_y=False, name=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
关于:参数名不一致 + paddle参数更多 多种类型的后面确实可以整体考虑优化下,目前按规范写的是 仅paddle参数更多
| dataset | dataset | 所用的数据集。 | | ||
| num_replicas | num_replicas | 进程数量。 | | ||
| rank | rank | num_replicas 个进程中的进程序号。 | | ||
| shuffle | shuffle | 是否打乱。PyTorch 默认值为 True, 默认值为 False。Paddle 需设置为与 PyTorch 一致。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddle默认值为False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已更新
| PyTorch | PaddlePaddle | 备注 | | ||
| ------- | ------------ | ------------------ | | ||
| dim | axis | 指定对输入 Tensor 进行运算的轴,仅参数名不一致。 | | ||
| keepdim | keepdim | 是否在输出 Tensor 中保留减小的维度。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddle的dtype没写,下个PR补上
| PyTorch | PaddlePaddle | 备注 | | ||
| ------- | ------------ | ------------------ | | ||
| dim | axis | 指定对输入 Tensor 进行运算的轴,仅参数名不一致。 | | ||
| keepdim | keepdim | 是否在输出 Tensor 中保留减小的维度。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddle的dtype没写,下个PR补上
| PyTorch | PaddlePaddle | 备注 | | ||
| ------- | ------------ | -- | | ||
| dim | axis | 指定对 x 进行计算的轴,仅参数名不一致。 | | ||
| keepdim | keepdim | 是否在输出 Tensor 中保留减小的维度,PyTorch 默认值为 False,Paddle 默认值为 True。Paddle 需设置为与 PyTorch 一致。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个我记得修改过来了,下个PR改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确实,已经改过来了,只是在 官网页面 上仍然没改。
@@ -1,29 +1,37 @@ | |||
## [ 参数不一致 ]torch.utils.data.distributed.DistributedSampler | |||
## [ torch 参数更多 ]torch.utils.data.distributed.DistributedSampler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
torch多的seed可直接删除,这样是不是就不用算torch参数更多,可以看下其他的这样情况是怎么处理的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
) | ||
paddle_pattern = re.compile( | ||
r"^### +\[ *(?P<paddle_api>paddle.[^\]]+)\]\((?P<url>[^\)]+)$" | ||
r"^### +\[ *(?P<paddle_api>paddle.[^\]]+)\](?P<url>\([^\)]*\))?$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已在 #6522 修复
剩余已实现的 api 文档正在整理中