Skip to content

InstanceNorm1d does not match documentation and is redundant. #9776

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

Closed
veugene opened this issue Jul 24, 2018 · 3 comments
Closed

InstanceNorm1d does not match documentation and is redundant. #9776

veugene opened this issue Jul 24, 2018 · 3 comments

Comments

@veugene
Copy link
Contributor

veugene commented Jul 24, 2018

InstanceNorm1d expects only 3D inputs, while the documentation states:

"Applies Instance Normalization over a 2D or 3D input (a mini-batch of 1D inputs with optional additional channel dimension)"

Furthermore, InstanceNorm1d, InstanceNorm2d, and InstanceNorm3d appear to be redundant as they add nothing to their parent class _InstanceNorm except an input dimension check.

Proposal A:
Fix the dimension check in InstanceNorm1d to allow both 2D and 3D inputs.

Proposal B:
Merge all instance norm classes into a single class, for any input dimensions > 1.

@veugene
Copy link
Contributor Author

veugene commented Jul 24, 2018

BatchNorm1d, BatchNorm2d, and BatchNorm3d are similarly redundant.

@arogozhnikov
Copy link

(confirm that in 0.4 InstanceNorm1d doesn't work with 2D inputs)

@soumith
Copy link
Member

soumith commented Jul 27, 2018

let's go with proposal A. We planned to deprecate (not delete) InstanceNorm*d in favor of a universal InstanceNorm, but haven't gotten around to it.

jramseyer pushed a commit to jramseyer/pytorch that referenced this issue Jul 30, 2018
…e 3D. (pytorch#9924)

Summary:
Fixes pytorch#9776.
Pull Request resolved: pytorch#9924

Differential Revision: D9028328

Pulled By: soumith

fbshipit-source-id: d5f22abb2be83b34aee95ebe144c97519a6854f8
goodlux pushed a commit to goodlux/pytorch that referenced this issue Aug 15, 2018
…e 3D. (pytorch#9924)

Summary:
Fixes pytorch#9776.
Pull Request resolved: pytorch#9924

Differential Revision: D9028328

Pulled By: soumith

fbshipit-source-id: d5f22abb2be83b34aee95ebe144c97519a6854f8
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 a pull request may close this issue.

3 participants