How to add constraints L2-norm to the conv layers and L1-norm to the fc layers when training a model

193 views
Skip to first unread message

汤旭

unread,
Oct 3, 2015, 4:51:08 AM10/3/15
to Caffe Users
How to add constraints L2-norm to the conv layers and L1-norm to the fc layers when training a model using caffe?
I know that we can use regularization_type: 'L1'  (in solver.prototxt) to give global constraints to all the layers. And also we can adjust the value of weight_decay and decay_mult to rectify the performance.

  optional float weight_decay = 12; // The weight decay.
  // regularization types supported: L1 and L2
  // controlled by weight_decay
  optional string regularization_type = 29 [default = "L2"];
 // The multiplier on the global weight decay for this parameter.
  optional float decay_mult = 4 [default = 1.0];

But how can i add constraints L2-norm to the conv layers and L1-norm to the fc layers when training a model using caffe?

汤旭

unread,
Oct 4, 2015, 1:07:33 AM10/4/15
to Caffe Users
Anybody know how to do ?

在 2015年10月3日星期六 UTC+8下午4:51:08,汤旭写道:
Reply all
Reply to author
Forward
0 new messages