Skip to content
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

映射文档 No. 360 #6016

Merged
merged 1 commit into from
Jul 31, 2023
Merged

映射文档 No. 360 #6016

merged 1 commit into from
Jul 31, 2023

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Jul 13, 2023

PaddlePaddle/PaConvert#112

360 torch.linalg.matrix_exp

@paddle-bot
Copy link

paddle-bot bot commented Jul 13, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6016.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@co63oc co63oc changed the title 映射文档 No. 360 映射文档 No. 360/378 Jul 13, 2023
@co63oc co63oc changed the title 映射文档 No. 360/378 映射文档 No. 360/378/379 Jul 13, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jul 13, 2023
@@ -744,6 +746,8 @@
| 8 | [torch.linalg.eigvals](https://pytorch.org/docs/1.13/generated/torch.linalg.eigvals.html?highlight=torch+linalg+eigvals#torch.linalg.eigvals) | [paddle.linalg.eigvals](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/linalg/eigvals_cn.html) | 功能一致, torch 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/linalg/torch.linalg.eigvals.md) |
| 9 | [torch.linalg.eig](https://pytorch.org/docs/1.13/generated/torch.linalg.eig.html?highlight=torch+linalg+eig#torch.linalg.eig) | [paddle.linalg.eig](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/linalg/eig_cn.html) | 功能一致, torch 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/linalg/torch.linalg.eig.md) |
| 10 | [torch.linalg.multi_dot](https://pytorch.org/docs/1.13/generated/torch.linalg.multi_dot.html?highlight=torch+linalg+multi_dot#torch.linalg.multi_dot) | [paddle.linalg.multi_dot](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/linalg/multi_dot_cn.html) | 功能一致, torch 参数更多 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/linalg/torch.linalg.multi_dot.md) |
| 11 | [torch.linalg.matrix_exp](https://pytorch.org/docs/1.13/generated/torch.linalg.matrix_exp.html#torch.linalg.matrix_exp) | | 功能缺失 |
| 12 | [torch.linalg.vander](https://pytorch.org/docs/1.13/generated/torch.linalg.vander.html#torch.linalg.vander) | | 功能缺失 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个能用paddle.vander来实现吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改取消torch.linalg.vander

@co63oc co63oc changed the title 映射文档 No. 360/378/379 映射文档 No. 360/379 Jul 18, 2023
@@ -631,6 +631,8 @@
| 序号 | PyTorch API | PaddlePaddle API | 备注 |
| ---- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| 1 | [torch.nn.init.calculate_gain](https://pytorch.org/docs/1.13/nn.init.html?highlight=gain#torch.nn.init.calculate_gain) | [paddle.nn.initializer.calculate_gain](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/initializer/calculate_gain_cn.html) | 功能一致, 参数一致 , [差异对比](https://github.com/PaddlePaddle/docs/tree/develop/docs/guides/model_convert/convert_from_pytorch/api_difference/init/torch.nn.init.calculate_gain.md) |
| 2 | [torch.nn.init.trunc_normal_](https://pytorch.org/docs/1.13/nn.init.html#torch.nn.init.trunc_normal_) | | 功能缺失 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个可以用 paddle.nn.initializer.TruncatedNormal 来实现,你看最新的文档中应该已经有了torch.nn.init.trunc_normal_ 的映射关系

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch.nn.init.trunc_normal_用法不同,torch是参数传入tensor,paddle是使用 paddle.framework.ParamAttr,没有合适转换规则
图片
图片

Copy link
Collaborator

@zhwesky2010 zhwesky2010 Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是设计不同的问题有替代实现方案了,先删除 torch.nn.init.trunc_normal_.md吧,我们会补充一下如何转换这个API

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@co63oc co63oc changed the title 映射文档 No. 360/379 映射文档 No. 360 Jul 19, 2023
@zhwesky2010
Copy link
Collaborator

需要处理下冲突

@co63oc
Copy link
Contributor Author

co63oc commented Jul 20, 2023

需要处理下冲突

已修改

@zhwesky2010 zhwesky2010 merged commit ff36fad into PaddlePaddle:develop Jul 31, 2023
1 check passed
@co63oc co63oc deleted the doc0713_2 branch August 4, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants