Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differential learning Rates - Keras

I was reading an article called Differential Learning Rates on Medium and was wondering if this could be applied in Keras. I was able to find this technique implemented in pytorch. Is this possible to implement in Keras? Is there any example code that someone could provide?

like image 438
Green Avatar asked Sep 05 '26 21:09

Green


1 Answers

Starting from Tensorflow 2.4, there is an argument in tf.keras.optimizers.Optimizer: gradient_transformers. It is a list of functions that take and return a list of pairs [(gradient, Variable), ...]. You can implement differential learning rates as transformations that decrease learning rates depending on a weight position in the network via this parameter.

like image 146
user1635327 Avatar answered Sep 07 '26 14:09

user1635327



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!