slightly relax batch norm check#4785
Merged
shelhamer merged 1 commit intoBVLC:masterfrom Sep 30, 2016
Merged
Conversation
Member
|
Thanks for issuing a patch for this @bwilbertz and sorry I couldn't handle it immediately. I'll try to check and merge today. Note that the CI failures seem to be some bogus issue with CUDA packages on the Travis machines: https://travis-ci.org/BVLC/caffe/jobs/163831672 We can hopefully resolve that shortly. @lukeyeager have you seen this issue w/ Travis? |
Contributor
Yeah we're working on it - sorry. |
Member
|
Thanks again for this @bwilbertz -- merged after checking it myself since the CI issue is unrelated. @lukeyeager thanks for looking into the CI problem! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As already raised in #4704, the current LayerSetup method of the BatchNormLayer expects to have no LayerParamter configured at all, but also adds 3 LayerParameter itself (cf. batch_norm_layer.cpp).
This all is done to avoid any unintenional backward modification of the global stats in the BatchNormLayer and therefore forcing
lr_mult = 0.f.As a consequence, a valid (upgraded) net, which was passed once into
Net<Dtype>(net_param)and read back viaToProto(...)cannot be passed a second time intoNetwithout being upgraded again.This PR slightly relaxes the checks in LayerSetUp, to just ensure
lr_mult == 0.for adding it, if the LayerParameter is missing (as it was introduced in #4704).