-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add GroupNormLayer
#850
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 GroupNormLayer
#850
Conversation
@2wins Thanks. Could you also change these two files: |
@zsdonghao if its fine with you this PR will be merged only after TL 2.0 |
It seen this layer only support 2D images?
|
@zsdonghao OK. I'll reflect it to them.
@wagamamaz Yes, I only consider 2D input case like |
@2wins I see, could you raise an exception if the input doesn't fix the shape? |
@DEKHTIARJonathan I think this one can be merged first, we need to support these kinds of layers, and I have no idea when the 2.0 can be finished.. 😭 |
@wagamamaz We need to discuss |
@2wins in the latest version, it seen that conv2d and many other layers already support |
tensorlayer/layers/normalization.py
Outdated
self.outputs = tf.reshape(x, tf.shape(self.inputs)) * gamma + beta | ||
self.outputs = self._apply_activation(self.outputs) | ||
|
||
variables = tf.get_collection(TF_GRAPHKEYS_VARIABLES, scope=vs.name) |
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.
This one will have error when two layers have similar name. Use the following instead:
The commit Support in GroupNormLayer 27224ce |
Checklist
Motivation and Context
Description
This is for a new normalization layer, Group Normalization Layer.
Even if there is
tf.contrib.layers.group_norm
, it has an unsolved issue (link).