-
Notifications
You must be signed in to change notification settings - Fork 55
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
转换规则 No.383 #220
Conversation
Thanks for your contribution! |
tests/test_nn_Module.py
Outdated
pytorch_code = textwrap.dedent( | ||
""" | ||
import torch | ||
module1 = torch.nn.Module() |
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.
这个一般用来继承基类,可以写一个简单的继承自MLP的Layer
然后重写compare函数,对比输出paddle结果是 paddle.nn.Layer 即可
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.
重写了两种测试,一个是检查模型输出是否相同,一个是检查class.name是否相同
tests/test_nn_Module.py
Outdated
def test_case_1(): | ||
pytorch_code = textwrap.dedent( | ||
""" | ||
import 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.
你这个退格有点奇怪,应该可以往后退4格的
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.
谢谢review,已修改
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.
LGTM
hi, @shuaills
|
感谢对飞桨【快乐开源升级版】的支持💕 辛苦扫码进群❗️本次开奖包含PS 5🎮、iPad🍎、i Watch、Switch、富士拍立得📷、镭射键盘⌨️、京东卡、百度周边等重磅好礼!🤩 🌱欢迎大家继续提PR,更多升级礼品敬请期待~ |
PR Docs
文档已存在
torch.nn.Module的映射文档
PR APIs
Pytorch-Paddle开源任务#112,No.383
为 torch.nn.Module 增加了测试