L2 regularization in caffe, conversion from lasagne

83 views
Skip to first unread message

shom...@gmail.com

unread,
Jan 10, 2017, 12:28:54 PM1/10/17
to Caffe Users
I have a lasgane code. I want to create the same network using caffe. I could conver the network.But i need help with the hyperparameters in lasagne. The hyperparameters look like:

lr = 1e-2
weight_decay = 1e-5

prediction = lasagne.layers.get_output(net['out'])
loss = T.mean(lasagne.objectives.squared_error(prediction, target_var))

weightsl2 = lasagne.regularization.regularize_network_params(net['out'], lasagne.regularization.l2)
loss += weight_decay * weightsl2

How do i perform the L2 regularization part in caffe? Relevant parts from my solver.prototxt is as below:

base_lr: 0.01 lr_policy: "fixed" weight_decay: 0.00001 regularization_type: "L2" stepsize: 300 gamma: 0.1 max_iter: 2000 momentum: 0.9

also posted in http://datascience.stackexchange.com

Reply all
Reply to author
Forward
0 new messages