Skip to content

Commit

Permalink
Merge branch 'master' of github.com:BVLC/caffe
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Tschopp committed Jan 20, 2017
2 parents 83b9ac8 + 5f84ad7 commit 948aa8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.config.example
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ PYTHON_INCLUDE := /usr/include/python2.7 \
# ANACONDA_HOME := $(HOME)/anaconda
# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
# $(ANACONDA_HOME)/include/python2.7 \
# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include

# Uncomment to use Python 3 (default is Python 2)
# PYTHON_LIBRARIES := boost_python3 python3.5m
Expand Down
8 changes: 7 additions & 1 deletion src/caffe/util/upgrade_proto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,13 @@ void UpgradeNetBatchNorm(NetParameter* net_param) {
// the previous BatchNorm layer definition.
if (net_param->layer(i).type() == "BatchNorm"
&& net_param->layer(i).param_size() == 3) {
net_param->mutable_layer(i)->clear_param();
// set lr_mult and decay_mult to zero. leave all other param intact.
for (int ip = 0; ip < net_param->layer(i).param_size(); ip++) {
ParamSpec* fixed_param_spec =
net_param->mutable_layer(i)->mutable_param(ip);
fixed_param_spec->set_lr_mult(0.f);
fixed_param_spec->set_decay_mult(0.f);
}
}
}
}
Expand Down

0 comments on commit 948aa8e

Please sign in to comment.