-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Instance norm #1283
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
Instance norm #1283
Conversation
soumith
left a comment
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.
almost looks good. Please check inline comments.
torch/nn/modules/instancenorm.py
Outdated
|
|
||
| return out.view(b, c, *input.size()[2:]) | ||
|
|
||
| def force_eval(self): |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/nn/modules/instancenorm.py
Outdated
| bias = self.bias.repeat(b) | ||
|
|
||
| # Apply instance norm | ||
| input_reshaped = input.view(1, b * c, *input.size()[2:]) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
thank you! |
|
As
|
Only allows horizontal fusion across tensor inputs. This prevents accidental fusion of operations sharing constant scalar inputs. (e.g. casting operations, where the problem was )
Implements instance normalization modules (1d, 2d, 3d). Based on batch norm, allows affine transform, but it is switched off by default.