-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 (N,C,*) input support for GroupNorm #34773
Conversation
Thanks for your contribution! |
2c293a1
to
183eb67
Compare
python/paddle/nn/layer/norm.py
Outdated
@@ -338,8 +338,8 @@ class GroupNorm(Layer): | |||
name(str, optional): Name for the GroupNorm, default is None. For more information, please refer to :ref:`api_guide_Name`.. | |||
|
|||
Shape: | |||
- x: 4-D tensor with shape: (batch, num_features, height, weight). | |||
- output: 4-D tensor with same shape as input x. | |||
- x: Tensor with shape: (N, C, *), where N is batch_size, C is num_features. |
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.
这里需要说明得更清晰些,比如tensor size的要求,不同的layout对应的shape也应该是不一样的。另外需要更新下fluiddoc下的中文文档
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.
PR types
Bug fixes
PR changes
OPs
Describe
The nn.GroupNorm is only support 4-D input now. However, there is no shape check for input tensor. So there are two type problems.
What this PR did: