# HG changeset patch # User bmailhe # Date 1332346878 0 # Node ID dfa795944aae97641b3548f819fa4cb5b29ce89c # Parent 36b02a8d0add2491abd12ac79c9e6b66b8591efb fixed some bugs in the default parameters of SMALL_two_step_DL diff -r 36b02a8d0add -r dfa795944aae DL/two-step DL/SMALL_two_step_DL.m --- 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))