epfl-lts2 / unlocbox

A Matlab convex optimization toolbox using proximal splitting methods
https://epfl-lts2.github.io/unlocbox-html/
Other
52 stars 19 forks source link

postpad not defined when running admm_demo #10

Closed Ying156209 closed 4 years ago

Ying156209 commented 5 years ago

I encounter the issue of ' undefined function or variable 'postpad' ' , when I try to run demo_admm. I don't know what is the depended-upon module of this function. And I already install and start those two packages :

The LTFAT toolbox (For sound demo) The GSPBox (Graph signal processing toolbox)

Do I still miss some module? The error information is shown below:

UnLocBoX version 1.7.4. Copyright 2012-2015 LTS2-EPFL, by Nathanael Perraudin LTFAT version 2.4.0. Copyright 2005-2018 Peter L. Soendergaard. For help, please type "ltfathelp". LTFAT is using the script language backend. (Your global and persistent variables have just been cleared. Sorry.) The time step is set manually to : 1 Algorithm selected: ADMM Iter 001: 未定义函数或变量 'postpad'。 出错 ifwt (line 154) f = postpad(f,Ls); 出错 ifwt2 (line 94) c(colRange,rowRange) = ifwt(c(colRange,rowRange),w,Jstep,Lcrows(LcIdx),'dim',1,'per'); 出错 demo_admm>@(x)ifwt2(x,'db8',6) 出错 demo_admm>@(x,T)(1+tauTmask).^(-1).(Lt(x)+tauTmask.z) 出错 admm_alg>admm_algorithm (line 76) s.x_n{1} = Fp{s.ind(1)}.proxL(s.x_n{2} - s.u_n,s.gamma); 出错 admm_alg>@(x_0,fg,Fp,sol,s,param)admm_algorithm(Fp,s) (line 4) s.algorithm = @(x_0, fg, Fp, sol, s, param) admm_algorithm(Fp, s); 出错 solvep (line 223) [sol, s] = algo.algorithm(x_0, fg, Fp, sol, s, param); 出错 admm (line 87) [sol, info] = solvep(x_0,{f1,f2},param); 出错 demo_admm (line 175) sol = admm(z, f1, f2, paramsolver);

nperraud commented 5 years ago

Do you have LTFAT installed?

Ying156209 commented 5 years ago

Do you have LTFAT installed?

Yes, I ran ltfatstart.m before i ran demos. And got the output like this:

LTFAT version 2.4.0. Copyright 2005-2018 Peter L. Soendergaard. For help, please type "ltfathelp". LTFAT is using the script language backend. (Your global and persistent variables have just been cleared. Sorry.)

Besides, funtions like comp_ifwt which seems to be a ltfat function works fine.

nperraud commented 5 years ago

I believe this is an LTFAT issue... At line 132 and 133, you will find

L = @(x)  fwt2(x,'db8',6);
Lt = @(x)  ifwt2(x,'db8',6);

Can you test these inline function works by simply running Lt(L(im_original))?

Ying156209 commented 5 years ago

I test it by those commands, and the results are shown below:

gsp_start

GSPBox version 0.7.5. Copyright 2013-2015 LTS2-EPFL, by Nathanael Perraudin, Johan Paratte, David Shuman and Vassilis Kalofolias

ltfatstart

LTFAT version 2.4.0. Copyright 2005-2018 Peter L. Soendergaard. For help, please type "ltfathelp". LTFAT is using the script language backend. (Your global and persistent variables have just been cleared. Sorry.)

init_unlocbox

UnLocBoX version 1.7.4. Copyright 2012-2015 LTS2-EPFL, by Nathanael Perraudin

demo_admm (with Lt(L(im_original)) in it)

UnLocBoX version 1.7.4. Copyright 2012-2015 LTS2-EPFL, by Nathanael Perraudin Undefined function or variable 'postpad'. Error in ifwt (line 154) f = postpad(f,Ls); Error in ifwt2 (line 94) c(colRange,rowRange) = ifwt(c(colRange,rowRange),w,Jstep,Lcrows(LcIdx),'dim',1,'per'); Error in demo_admm>@(x)ifwt2(x,'db8',6) Error in demo_admm (line 148) Lt(L(im_original));

nperraud commented 5 years ago

Then the problem comes indeed from LTFAT. The code is also broken for me, but at a different place. I am waiting for LTFAT developper to fix it. Meanwhile you can probably use an older version of LTFAT.