summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorepapoutsellis <epapoutsellis@gmail.com>2019-04-25 17:45:46 +0100
committerepapoutsellis <epapoutsellis@gmail.com>2019-04-25 17:45:46 +0100
commit07e7344926bc8850ef5e2c1580fdff580ca8c9a9 (patch)
treef61fde179f7b2762c892f77edd4673459e1d520d /Wrappers/Python
parentb726c09f16c256daf92544668d2ff51bed3cf06f (diff)
downloadframework-07e7344926bc8850ef5e2c1580fdff580ca8c9a9.tar.gz
framework-07e7344926bc8850ef5e2c1580fdff580ca8c9a9.tar.bz2
framework-07e7344926bc8850ef5e2c1580fdff580ca8c9a9.tar.xz
framework-07e7344926bc8850ef5e2c1580fdff580ca8c9a9.zip
callback fix
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/wip/Demos/PDHG_TV_Denoising_Poisson.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/Wrappers/Python/wip/Demos/PDHG_TV_Denoising_Poisson.py b/Wrappers/Python/wip/Demos/PDHG_TV_Denoising_Poisson.py
index 482b3b4..32ab62d 100644
--- a/Wrappers/Python/wip/Demos/PDHG_TV_Denoising_Poisson.py
+++ b/Wrappers/Python/wip/Demos/PDHG_TV_Denoising_Poisson.py
@@ -87,7 +87,19 @@ opt = {'niter':2000, 'memopt': True}
pdhg = PDHG(f=f,g=g,operator=operator, tau=tau, sigma=sigma, memopt=True)
pdhg.max_iteration = 2000
pdhg.update_objective_interval = 50
-pdhg.run(2000)
+
+def pdgap_print(niter, objective, solution):
+
+
+ print( "{:04}/{:04} {:<5} {:.4f} {:<5} {:.4f} {:<5} {:.4f}".\
+ format(niter, pdhg.max_iteration,'', \
+ objective[0],'',\
+ objective[1],'',\
+ objective[2]))
+
+#pdhg.run(2000)
+
+pdhg.run(2000, callback = pdgap_print)
plt.figure(figsize=(15,15))