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

add no_check_list for no_grad_set rule #22571

Merged
merged 4 commits into from
Feb 19, 2020

Conversation

chenjiaoAngel
Copy link
Contributor

@chenjiaoAngel chenjiaoAngel commented Feb 12, 2020

according to reason of no_grad_set relu, add NO_CHECK_LIST for no_grad_set relu in no_grad_set_white_list

如果单测的时候发现某个变量的反向出错了,且把这些变量加到这个no_grad_set 里面,则单测就不会做检查 ,也不会发现此错误。
故为了防止大家乱用 no_grad _set,添加no_grad_set specification规则。在OpTest中添加了相应检测方法,在CI中添加了对本规范白名单的检查。

错误示例:
将所有输入赋值给no_grad_set,这是不可取的。
在python/paddle/fluid/tests/unittests/sequence/test_sequence_conv.py中:
1
2

He adds the certain variable to the no_grad_set,when running a test, he finds that the reverse of this variable is wrong, the test will not check and the error will not be found.
In order to avoid the indiscriminate use of the no_grad_set value, the specification that the value of no_grad_set must be None is proposed. The corresponding detections are added to Op tests, and CI will check the white list of this specification

Error example:
That the value of no_grad_set is the all input of OP is not possible
python/paddle/fluid/tests/unittests/sequence/test_sequence_conv.py:
1
2

@chenjiaoAngel chenjiaoAngel changed the title add no_check_list for no_grad_set relu add no_check_list for no_grad_set rule Feb 14, 2020
@luotao1 luotao1 merged commit df144e2 into PaddlePaddle:develop Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants