From a19357a190664b1ea99d18e14eedc27e43ebed42 Mon Sep 17 00:00:00 2001 From: shai Date: Sun, 15 Jan 2017 08:54:45 +0000 Subject: [PATCH 1/2] fixing upgrade_proto for BatchNorm layer: be more conservative leave "name" in param, only set lr_mult and decay_mult to zero --- src/caffe/util/upgrade_proto.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/caffe/util/upgrade_proto.cpp b/src/caffe/util/upgrade_proto.cpp index a0aacbe92f8..94771c8c050 100644 --- a/src/caffe/util/upgrade_proto.cpp +++ b/src/caffe/util/upgrade_proto.cpp @@ -1018,7 +1018,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); + } } } } From 9b9f6d02ccb664b7f17ce2d3d17072ba578cac09 Mon Sep 17 00:00:00 2001 From: Jonathan L Long Date: Wed, 18 Jan 2017 16:03:55 -0800 Subject: [PATCH 2/2] [build] remove trailing backslash on comment --- Makefile.config.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.config.example b/Makefile.config.example index 541cf8077d5..b590bd16ce9 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -68,7 +68,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