-
Notifications
You must be signed in to change notification settings - Fork 762
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
【映射文档】新增部分映射文档 #6512
【映射文档】新增部分映射文档 #6512
Conversation
RedContritio
commented
Mar 5, 2024
•
edited
Loading
edited
- 新增部分映射文档
- 合并检查逻辑,减少检查出现问题的可能性,并参考 此前意见 ,当类型不符合预设类型时,中断生成。
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6512.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
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.
...rt/convert_from_pytorch/api_difference/functional/torch.nn.functional._Reduction.get_enum.md
Outdated
Show resolved
Hide resolved
..._convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.alpha_dropout.md
Show resolved
Hide resolved
...t/convert_from_pytorch/api_difference/functional/torch.nn.functional.binary_cross_entropy.md
Outdated
Show resolved
Hide resolved
...t/convert_from_pytorch/api_difference/functional/torch.nn.functional.binary_cross_entropy.md
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,24 @@ | |||
## [ 仅参数名不一致 ]torch.nn.functional.dropout |
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参数 更多吧
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 角度来看,inplace 可删除所以应该算是 torch 参数更多
### [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) |
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.
这个有没有inplace的版本对应
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.
没有,目前实现上是直接用的 GenericMatcher
...s/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.rrelu_.md
Outdated
Show resolved
Hide resolved
...des/model_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.silu.md
Show resolved
Hide resolved
|
||
# Paddle 写法 | ||
out1, out2 = paddle.mode(x, dim, False) | ||
paddle.assign(out1, (a, b)[0]), paddle.assign(out2, (a, b)[1]) |
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.assign(out1, a)
paddle.assign(out2, b)
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.assign(out1, a), paddle.assign(out2, b)
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.nn.Module.modules.md
Outdated
Show resolved
Hide resolved
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.
写完文档后自查一遍:包括 映射分类、参数映射 的细节
...odel_convert/convert_from_pytorch/api_difference/functional/torch.nn.functional.embedding.md
Outdated
Show resolved
Hide resolved
...vert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multi_margin_loss.md
Outdated
Show resolved
Hide resolved
...vert/convert_from_pytorch/api_difference/functional/torch.nn.functional.multi_margin_loss.md
Show resolved
Hide resolved
...rt_from_pytorch/api_difference/functional/torch.nn.functional.multilabel_soft_margin_loss.md
Outdated
Show resolved
Hide resolved
...rt_from_pytorch/api_difference/functional/torch.nn.functional.multilabel_soft_margin_loss.md
Show resolved
Hide resolved
paddle.nn.functional.rrelu(x, lower=1./8., upper=1./3., training=True, name=None) | ||
``` | ||
|
||
其中 PyTorch 和 Paddle 功能一致,参数名与参数默认值不一致,具体如下: |
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.
说明一下两个API的inplace区别吧,参考上面的inplace参数描述
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.mode.md
Outdated
Show resolved
Hide resolved
docs/guides/model_convert/convert_from_pytorch/api_difference/ops/torch.mode.md
Outdated
Show resolved
Hide resolved
e6a04b8
to
a3419ce
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.
下个PR修改一下,先合入了
@@ -0,0 +1,27 @@ | |||
## [torch 参数]torch.nn.functional.embedding |
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参数更多
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.
追加,该文件因为没有出现在主目录中,所以未作映射类别检查,后续考虑继续完善
* fix incorrect mapping type from docs/#6512 * update 2 doc * fix paddle api url in torch.mean * update some docs * fix some bugs