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.383 #220

Merged
merged 8 commits into from
Aug 18, 2023
Merged

转换规则 No.383 #220

merged 8 commits into from
Aug 18, 2023

Conversation

shuaills
Copy link
Contributor

@shuaills shuaills commented Aug 3, 2023

PR Docs

文档已存在
torch.nn.Module的映射文档

PR APIs

Pytorch-Paddle开源任务#112,No.383
torch.nn.Module 增加了测试

@paddle-bot
Copy link

paddle-bot bot commented Aug 3, 2023

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Aug 3, 2023

CLA assistant check
All committers have signed the CLA.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Aug 3, 2023
pytorch_code = textwrap.dedent(
"""
import torch
module1 = torch.nn.Module()
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个一般用来继承基类,可以写一个简单的继承自MLP的Layer

然后重写compare函数,对比输出paddle结果是 paddle.nn.Layer 即可

Copy link
Contributor Author

Choose a reason for hiding this comment

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

重写了两种测试,一个是检查模型输出是否相同,一个是检查class.name是否相同

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Aug 4, 2023
def test_case_1():
pytorch_code = textwrap.dedent(
"""
import torch
Copy link
Collaborator

Choose a reason for hiding this comment

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

你这个退格有点奇怪,应该可以往后退4格的

Copy link
Contributor Author

Choose a reason for hiding this comment

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

谢谢review,已修改

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 merged commit 7caabb4 into PaddlePaddle:master Aug 18, 2023
@luotao1
Copy link
Collaborator

luotao1 commented Aug 18, 2023

hi, @shuaills

  • 非常感谢你对飞桨框架的贡献,我们正在运营一个PFCC组织,会通过定期分享技术知识与发布开发者主导任务的形式持续为飞桨框架做贡献,详情可见 https://github.com/luotao1 主页说明。
  • 如果你对PFCC有兴趣,请发送邮件至 ext_paddle_oss@baidu.com,我们会邀请你加入~

@luotao1
Copy link
Collaborator

luotao1 commented Nov 30, 2023

感谢对飞桨【快乐开源升级版】的支持💕

辛苦扫码进群❗️本次开奖包含PS 5🎮、iPad🍎、i Watch、Switch、富士拍立得📷、镭射键盘⌨️、京东卡、百度周边等重磅好礼!🤩
请务必在今天24:00之前进群,配合项目组收集邮寄信息,尽快寄出礼品~

🌱欢迎大家继续提PR,更多升级礼品敬请期待~
image
@shuaills

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR status: proposed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants