From a6751723234926bdd03b6167ea6414da109854a3 Mon Sep 17 00:00:00 2001 From: philkr Date: Tue, 1 Sep 2015 13:11:26 -0700 Subject: Compute backward for negative lr_mult --- src/caffe/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/caffe') diff --git a/src/caffe/net.cpp b/src/caffe/net.cpp index f1fc63ab..89d14013 100644 --- a/src/caffe/net.cpp +++ b/src/caffe/net.cpp @@ -182,7 +182,7 @@ void Net::Init(const NetParameter& in_param) { for (int param_id = 0; param_id < num_param_blobs; ++param_id) { const ParamSpec* param_spec = (param_id < param_size) ? &layer_param.param(param_id) : &default_param_spec; - const bool param_need_backward = param_spec->lr_mult() > 0; + const bool param_need_backward = param_spec->lr_mult() != 0; need_backward |= param_need_backward; layers_[layer_id]->set_param_propagate_down(param_id, param_need_backward); -- cgit v1.2.3