summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorepapoutsellis <epapoutsellis@gmail.com>2019-04-07 22:40:10 +0100
committerepapoutsellis <epapoutsellis@gmail.com>2019-04-07 22:40:10 +0100
commit02b5c1521cf810321a7e93714648dd955272043f (patch)
tree26bf677e55ce3360f9d4fbd5e2e59328def0c268 /Wrappers/Python
parent535241a9dfb6ad29a1d41d2aad737478705d5866 (diff)
downloadframework-02b5c1521cf810321a7e93714648dd955272043f.tar.gz
framework-02b5c1521cf810321a7e93714648dd955272043f.tar.bz2
framework-02b5c1521cf810321a7e93714648dd955272043f.tar.xz
framework-02b5c1521cf810321a7e93714648dd955272043f.zip
fix pdgap for function composition
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py b/Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py
index 94b0bde..df53e57 100644
--- a/Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py
+++ b/Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py
@@ -140,18 +140,18 @@ def PDHG_old(f, g, operator, tau = None, sigma = None, opt = None, **kwargs):
y_old = y
# if isinstance(f, FunctionOperatorComposition):
- p1 = f(x) + g(x)
+# p1 = f(x) + g(x)
# else:
-# p1 = f(operator.direct(x)) + g(x)
- d1 = -(f.convex_conjugate(y) + g(-1*operator.adjoint(y)))
- pd1 = p1 - d1
+# p1 = f(operator.direct(x)) + g(x)
+# d1 = -(f.convex_conjugate(y) + g(-1*operator.adjoint(y)))
+# pd1 = p1 - d1
- primal.append(p1)
- dual.append(d1)
- pdgap.append(pd1)
+# primal.append(p1)
+# dual.append(d1)
+# pdgap.append(pd1)
- if i%100==0:
- print(p1, d1, pd1)
+# if i%100==0:
+# print(p1, d1, pd1)
# if isinstance(f, FunctionOperatorComposition):
# p1 = f(x) + g(x)
# else: