Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/optim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoray Kavukcuoglu <koray@kavukcuoglu.org>2012-04-09 18:19:01 +0400
committerKoray Kavukcuoglu <koray@kavukcuoglu.org>2012-04-09 18:19:01 +0400
commitd87a356f1f8d78f213719c2a13348883b790cbfe (patch)
tree4570fee26e601f8bdfbbb35eaab0561374858e66 /fista.lua
parentaf1f287eb03ae9b07e4e7640cf16bdc7e4570637 (diff)
make fista exactly compatible to lush version
Diffstat (limited to 'fista.lua')
-rw-r--r--fista.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/fista.lua b/fista.lua
index ad03195..b13283d 100644
--- a/fista.lua
+++ b/fista.lua
@@ -166,11 +166,13 @@ function optim.FistaLS(f, g, pl, xinit, params)
-- are we done?
if niter > 1 and math.abs(history[niter].F - history[niter-1].F) <= errthres then
converged = true
- return xk,history
+ xinit:copy(y)
+ return y,history
end
if niter >= maxiter then
- return xk,history
+ xinit:copy(y)
+ return y,history
end
--if niter > 1 and history[niter].F > history[niter-1].F then