-
Notifications
You must be signed in to change notification settings - Fork 118
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】47. Add test of nn.dynamic_decode v0.1 #330
Conversation
if error in e.args[0]: | ||
pass | ||
else: | ||
raise Exception |
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.
补充如下case
1、dynamic_decode的decoder参数试试可不可以是另一个dynamic_decode。
2、inits的size和decoder不匹配时
3、is_test=False, return_length=False这两个参数的测试。
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.
第一条好像不太行呀,dynamic_decode是整个解码过程的入口,需要传入的参数就是Decoder的一个实例,他是动态调用Decoder的step函数按步执行decode,但是dynamic_decode就是个解码函数,并没有step函数,本身就不是个解码器呀
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.
已更新
2.新增is_test=False, return_length=False这两个参数的测试
2.新增is_test=False, return_length=False这两个参数的测试
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.
可以参考下我们对您之前提的 beamsearch的修改,改一下测试代码。主要原因如下:
通过固定seed算出的结果,会在不同硬件条件&系统下出现不同的结果,这样会存在其他环境挂Case的情况。由于beamsearchdecode内部包含topk操作,通过赋值Constant初始化也会存在topk分数一致随机排序的情况,无法固定结果。所以最终选择在某一环境下保存参数模型,通过saveload的方式保证结果的一致性,请参考https://github.com/PaddlePaddle/PaddleTest/pull/332/files 修改。会存在提交模型参数文件过不了Codestyle安全检测的情况,后续会予以豁免。
# Conflicts: # framework/api/nn/model/model_grucell5 # framework/api/nn/model/model_grucell6 # framework/api/nn/model/model_lstmcell1 # framework/api/nn/model/model_lstmcell2 # framework/api/nn/test_dynamicdecode.py
@DDDivano 已更新 |
@ZS-Yan 有个CI挂了 需要处理下哈~ |
@TCChenlong 你好,之前参考了 DDDivano 的建议修改了测试代码,他说会存在提交模型参数文件过不了Codestyle安全检测的情况,后续会予以豁免。 |
Add test of nn.dynamic_decode v0.1