diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2017-10-25 16:37:06 +0100 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2017-10-25 16:37:06 +0100 |
commit | 5f697ee003b026e89bd215c685c002169f74a166 (patch) | |
tree | 1085c701a73a61eeaf0c3fe432693db9ec68b83f /src | |
parent | ea490be883d6933c481383a42e0d50edb19ece73 (diff) | |
parent | 57bf94984e7d3348afc13e27086add4cd5e939c8 (diff) | |
download | regularization-5f697ee003b026e89bd215c685c002169f74a166.tar.gz regularization-5f697ee003b026e89bd215c685c002169f74a166.tar.bz2 regularization-5f697ee003b026e89bd215c685c002169f74a166.tar.xz regularization-5f697ee003b026e89bd215c685c002169f74a166.zip |
Merge branch 'origin/pythonize' into pythonize
Diffstat (limited to 'src')
-rw-r--r-- | src/Python/fista_module.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Python/fista_module.cpp b/src/Python/fista_module.cpp index c36329e..94d156c 100644 --- a/src/Python/fista_module.cpp +++ b/src/Python/fista_module.cpp @@ -338,7 +338,7 @@ bp::list FGP_TV(np::ndarray input, double d_mu, int iter, double d_epsil, int me A = reinterpret_cast<float *>(input.get_data()); //mu = (float)mxGetScalar(prhs[1]); /* regularization parameter */ - mu = (float)d_mu; + lambda = (float)d_mu; //iter = 35; /* default iterations number */ @@ -408,15 +408,14 @@ bp::list FGP_TV(np::ndarray input, double d_mu, int iter, double d_epsil, int me /* begin iterations */ for (ll = 0; ll<iter; ll++) { - /* computing the gradient of the objective function */ Obj_func2D(A, D, R1, R2, lambda, dimX, dimY); /*Taking a step towards minus of the gradient*/ Grad_func2D(P1, P2, D, R1, R2, lambda, 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; @@ -1048,4 +1047,4 @@ BOOST_PYTHON_MODULE(cpu_regularizers) def("LLT_model", LLT_model); def("PatchBased_Regul", PatchBased_Regul); def("TGV_PD", TGV_PD); -}
\ No newline at end of file +} |