diff options
author | algol <dkazanc@hotmail.com> | 2018-02-06 15:17:45 +0000 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2018-02-06 16:24:46 +0000 |
commit | 60be5543cd748a64f085c600d0fd62926ded2f62 (patch) | |
tree | 25830f774530d43487f6f139de24e375d5736ca8 /Wrappers/Python/src | |
parent | c98c688fecda489f7396ccd66a1487e9c0f6989f (diff) | |
download | regularization-60be5543cd748a64f085c600d0fd62926ded2f62.tar.gz regularization-60be5543cd748a64f085c600d0fd62926ded2f62.tar.bz2 regularization-60be5543cd748a64f085c600d0fd62926ded2f62.tar.xz regularization-60be5543cd748a64f085c600d0fd62926ded2f62.zip |
Updated demo for CPU regularizers, bug fixed in fista_module.cpp for FGP_TV
Diffstat (limited to 'Wrappers/Python/src')
-rw-r--r-- | Wrappers/Python/src/fista_module.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Wrappers/Python/src/fista_module.cpp b/Wrappers/Python/src/fista_module.cpp index cef3ecc..e311570 100644 --- a/Wrappers/Python/src/fista_module.cpp +++ b/Wrappers/Python/src/fista_module.cpp @@ -412,13 +412,13 @@ bp::list FGP_TV(np::ndarray input, double d_mu, int iter, double d_epsil, int me /*Taking a step towards minus of the gradient*/ Grad_func2D(P1, P2, D, R1, R2, lambda, dimX, dimY); - - - - - /*updating R and t*/ - tkp1 = (1.0f + sqrt(1.0f + 4.0f*tk*tk))*0.5f; - Rupd_func2D(P1, P1_old, P2, P2_old, R1, R2, tkp1, tk, dimX, dimY); + + /* projection step */ + Proj_func2D(P1, P2, methTV, dimX, dimY); + + /*updating R and t*/ + tkp1 = (1.0f + sqrt(1.0f + 4.0f*tk*tk))*0.5f; + Rupd_func2D(P1, P1_old, P2, P2_old, R1, R2, tkp1, tk, dimX, dimY); /* calculate norm */ re = 0.0f; re1 = 0.0f; @@ -429,7 +429,7 @@ bp::list FGP_TV(np::ndarray input, double d_mu, int iter, double d_epsil, int me } re = sqrt(re) / sqrt(re1); if (re < epsil) count++; - if (count > 3) { + if (count > 4) { Obj_func2D(A, D, P1, P2, lambda, dimX, dimY); funcval = 0.0f; for (j = 0; j<dimX*dimY*dimZ; j++) funcval += pow(D[j], 2); |