Mercurial > hg > smallbox
changeset 209:dfa795944aae luisf_dev
fixed some bugs in the default parameters of SMALL_two_step_DL
author | bmailhe |
---|---|
date | Wed, 21 Mar 2012 16:21:18 +0000 |
parents | 36b02a8d0add |
children | f12a476a4977 |
files | DL/two-step DL/SMALL_two_step_DL.m |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/DL/two-step DL/SMALL_two_step_DL.m Wed Mar 21 14:13:31 2012 +0000 +++ b/DL/two-step DL/SMALL_two_step_DL.m Wed Mar 21 16:21:18 2012 +0000 @@ -4,7 +4,7 @@ solver = DL.param.solver; -% determine which type of udate to use ('KSVD', 'MOD', 'ols' or 'mailhe') % +% determine which type of udate to use ('KSVD', 'MOD', 'ols', 'opt' or 'LGD') % typeUpdate = DL.name; @@ -58,13 +58,18 @@ % learningRate. If the type is 'ols', it is the descent step of % the gradient (typical choice: 0.1). If the type is 'mailhe', the -% descent step is the optimal step*rho (typical choice: 1, although 2 -% or 3 seems to work better). Not used for MOD and KSVD. +% descent step is the optimal step*rho (typical choice: 1, although 2 works +% better). Not used for MOD and KSVD. if isfield(DL.param,'learningRate') learningRate = DL.param.learningRate; else - learningRate = 0.1; + switch typeUpdate + case 'ols' + learningRate = 0.1; + otherwise + learningRate = 1; + end end % number of iterations (default is 40) % @@ -113,7 +118,7 @@ [dico, solver.solution] = dico_update(dico, sig, solver.solution, ... typeUpdate, flow, learningRate); if (decorrelate) - dico = dico_decorr(dico, mu, solver.solution); + dico = dico_decorr_symetric(dico, mu, solver.solution); end if ((show_dictionary)&&(mod(i,show_iter)==0))