change learning rate trainlm

8 visualizaciones (últimos 30 días)
Pendar  Arzandeh
Pendar Arzandeh el 25 de Mayo de 2022
Respondida: Krishna el 25 de Ag. de 2024
How to change learning rate in trainlm? matlab allows changing mu and Gradient
tnx
  1 comentario
Phuong Huynh
Phuong Huynh el 26 de Mayo de 2022
I also wonder about this problem. I think trainlm function (optimizer) auto choose LR for us (http://matlab.izmiran.ru/help/toolbox/nnet/trainlm.html). Because other function allows us to change LR (for example :traingdx) when we change parameter net.trainParam.lr

Iniciar sesión para comentar.

Respuestas (1)

Krishna
Krishna el 25 de Ag. de 2024
Hello,
From what I understand you want to change the learning rate of ‘trainlm’ optimiser. If you go through the documentation of ‘trainlm’ function you can see that there is no way to set a learning rate of this optimiser, but you can control the learning dynamics via mu, the adaptive parameter that adjusts the learning process in Levenberg-Marquardt as it acts similarly to the learning rate. A smaller mu allows smaller steps during learning, which can lead to finer adjustments but slower convergence. A larger mu takes bigger steps, which may speed up convergence but risks overshooting.
Set the hyper-paramter ‘net.trainParam.mu_dec’ to specify how much to decrease ‘mu’ when the error decreases after an iteration. Also set parameter ‘net.trainParam.mu_inc’ how much to increase ‘mu’ when the error increase after an iteration.
Please go through the following documentation to learn more regarding the hyper-parameters of Levenberg-Marquardt algorithm and also the mathematical update function being used in the following algorithm,
Also please go through the following documentation to learn more about how to ask question on MATLAB answer and get a fast response,
Hope this helps.

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by