From 9ea038a833301e4ccd759d2b0c634215c82d10f4 Mon Sep 17 00:00:00 2001
From: Stephan Hilb <stephan@ecshi.net>
Date: Mon, 20 Jun 2022 14:50:59 +0200
Subject: [PATCH] fix primal-dual parameter choices

---
 scripts/run_experiments.jl | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/run_experiments.jl b/scripts/run_experiments.jl
index e5c5892..f5b1481 100644
--- a/scripts/run_experiments.jl
+++ b/scripts/run_experiments.jl
@@ -988,10 +988,12 @@ function denoise_pd(ctx)
 
     # semi-implicit primal dual parameters
     mu = st.alpha2 + st.beta # T = I, S = I
-    mu /= 100 # kind of arbitrary?
+    #mu /= 100 # kind of arbitrary?
 
-    tau = 1e-1
     L = norm_gradient(mesh)
+    #tau = 1e-1
+    tau = 1 / L
+    #L = 100
     sigma = inv(tau * L^2)
     theta = NaN # initialized later
 
@@ -1022,6 +1024,7 @@ function denoise_pd(ctx)
         while true
             k += 1
             if ctx.params.algorithm == :pd1
+                theta = 1 / sqrt(1 + 2 * mu * tau) # constant
                 # no step size control
                 step_pd2!(st; sigma, tau, theta)
             elseif ctx.params.algorithm == :pd2
@@ -1322,6 +1325,7 @@ function experiment_approximation(ctx)
 end
 
 # TODO: deduplicate, cf. optflow()
+# NOTE: used also by inpaint_denoise experiment
 function inpaint(ctx)
     # expect ctx.params.g_arr
 
-- 
GitLab