Skip to content
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

Why not use BatchNorm in-place, any concern? #13

Open
WenzhMicrosoft opened this issue Jul 27, 2017 · 6 comments
Open

Why not use BatchNorm in-place, any concern? #13

WenzhMicrosoft opened this issue Jul 27, 2017 · 6 comments

Comments

@WenzhMicrosoft
Copy link

No description provided.

@liuzhuang13
Copy link
Owner

liuzhuang13 commented Jul 27, 2017

Hi @WenzhMicrosoft , sorry, what do you mean by in-place BatchNorm? We know Torch supports in-place ReLU, but we're not aware of in-place BatchNorm layer.

@liuzhuang13
Copy link
Owner

liuzhuang13 commented Jul 27, 2017

Sorry, I thought the issue was opened on our Torch repo. Please ignore the comment above.

The reason is that in-place BatchNorm layers will overwrite the incoming feature maps, which will actually be used by later BatchNorm layers.

@WenzhMicrosoft
Copy link
Author

Thanks for quick reply! It makes sense, I wonder if I can apply in-place BatchNorm on transition layers and the first BatchNorm layer(right after data layer and first conv layer)

@John1231983
Copy link

@WenzhMicrosoft : I can answer the first point. The in-place BatchNorm cannot apply in transition layer because before it is a Concat layer. For the second point, I think we can use in-place=true for saving memory, but I am not sure about this point

@WenzhMicrosoft
Copy link
Author

@John1231983, I don't understand why the in-place BatchNorm can't apply after Concat layer, could you explain a little bit?

@John1231983
Copy link

@WenzhMicrosoft: I am using caffe and i confirm that it cannot. I do not know the reason. May be caffe did not support

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

No branches or pull requests

3 participants