How to set learning rate of individual Link/Function in chainer?

208 Views Asked by At

caffe can do this. Because some layer of neural network need big learning rate, but conv layer need small lr. How to control different layer have different lr in chainer so that optimizer can update according to correspond lr?

1

There are 1 best solutions below

2
On BEST ANSWER

You can overwrite hyperparam for each parameter of update_rule, which specifies the optimizer's update strategy, in the link like below,

model.l1.W.update_rule.hyperparam.lr = 0.01

For details, I already answered the same question at

How to implement separate learning rate or optimizer in different layer in Chainer?

By the way, chainer's Function does not have any parameter to be updated, thus function does not have update_rule.