-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【PaddlePaddle Hackathon】1、在 Paddle 中新增 AdaptiveLogSoftmaxWithLoss #37024
Conversation
Thanks for your contribution! |
@zhiboniu 您好,请问iscan的报错怎么看呀,点进ditails看不到 |
python/paddle/fluid/tests/unittests/test_adaptive_log_softmax_with_loss.py
Outdated
Show resolved
Hide resolved
python/paddle/fluid/tests/unittests/test_adaptive_log_softmax_with_loss.py
Outdated
Show resolved
Hide resolved
python/paddle/fluid/tests/unittests/test_adaptive_log_softmax_with_loss.py
Show resolved
Hide resolved
@zhiboniu 已更新 |
python/paddle/fluid/tests/unittests/test_adaptive_log_softmax_with_loss.py
Show resolved
Hide resolved
class TestNNAdaptiveLogSoftmaxWithLossAPI(unittest.TestCase): | ||
def setUp(self): | ||
paddle.disable_static() | ||
paddle.seed(10) |
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.
把seed去掉random就不会挂了
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.
@zhiboniu 已更新
Sorry to inform you that c934522's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
# argmax outside of shortlist | ||
asfm = nn.AdaptiveLogSoftmaxWithLoss( | ||
8, 10, [4, 8], div_value=2., head_bias=True) | ||
asfm.head.weight.detach().abs() |
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.
参考上面两个对话,你当前还是没有能验证实现的正确性。
以test_linear.py为例,可以按如下步骤完成:
1)固定可学习参数权重值为1。
2)获得模型推理结果概率分布,不仅仅是argmax值。
3)使用numpy实现推理公式。
4)使用同一个随机输入验证paddle输出概率分布与numpy计算结果相同。
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
PR types
New features
PR changes
APIs
Describe