add groupnorm group divisible check#35644
Merged
jeff41404 merged 1 commit intoPaddlePaddle:developfrom Sep 16, 2021
zhiboniu:develop_groupnorm
Merged
add groupnorm group divisible check#35644jeff41404 merged 1 commit intoPaddlePaddle:developfrom zhiboniu:develop_groupnorm
jeff41404 merged 1 commit intoPaddlePaddle:developfrom
zhiboniu:develop_groupnorm
Conversation
|
Thanks for your contribution! |
Contributor
|
Describe 中详细描述下问题解决方案 和 解决后的结果 |
jeff41404
reviewed
Sep 15, 2021
Comment on lines
147
to
155
Contributor
There was a problem hiding this comment.
异常检查建议都加在 InferShape 中,避免不同设备的compute中都包含这些逻辑
jeff41404
reviewed
Sep 15, 2021
Comment on lines
55
to
61
Contributor
There was a problem hiding this comment.
异常检查建议都加在 InferShape 中,避免不同设备的compute中都包含这些逻辑
…roup divisible check
AnnaTrainingG
pushed a commit
to AnnaTrainingG/Paddle
that referenced
this pull request
Sep 29, 2021
…roup divisible check (PaddlePaddle#35644)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
APIs
Describe
add groupnorm group divisible check
修改内容:
1)修改group_size计算公式为: group_size = floor(C / groups),分组方式与行业惯例保持一致。
2)考虑groupnorm本意。添加channel_num能够被groups整除的检查。如果不能整除则会报错。
Log:
ValueError: (InvalidArgument) Expected number of channels in input to be divisible by num_groups, but got input channel is 6 and num_groups is 4
[Hint: Expected channel_num % groups == 0, but received channel_num % groups:2 != 0:0.] (at /home/niuzhibo/work/paddleapi/Paddle/paddle/fluid/operators/group_norm_op.cc:74)
[operator < group_norm > error]