Commit e8404935 authored by Alexander Dornheim's avatar Alexander Dornheim
Browse files

In DRl.py changed variable name lambda to lambda1 (lambda is a reserved keyword in Python)

In __init__py import from DRl and add "DRl" to __all__
In Phase_graphics commented out reference to betas (not used at the moment anyway)
parent 487973be
import sys
sys.path.append('../proxtoolbox/Problems/Phase')
sys.path.append('..')
import tasse_ap_in
import tasse_DRl_in
from phase import Phase
tasse = Phase(tasse_ap_in.new_config)
tasse = Phase(tasse_DRl_in.new_config)
tasse.solve()
tasse.show()
......@@ -21,8 +21,8 @@ class DRl(SimpleAlgorithm):
tmp1 = 2*self.prox2.work(u)-u
tmp2=self.prox1.work(tmp1)
# update
lambda = exp((-iter/lambda_switch)**3)*lambda0+(1-exp((-iter/lambda_switch)**3))*lambda_max # unrelaxes as the
unew = (lambda*(2*tmp2-tmp1) + (1-lambda)*tmp1 + u)/2
lambda1 = exp((-iter/lambda_switch)**3)*lambda0+(1-exp((-iter/lambda_switch)**3))*lambda_max # unrelaxes as the
unew = (lambda1*(2*tmp2-tmp1) + (1-lambda1)*tmp1 + u)/2
return unew
......@@ -16,6 +16,6 @@ from .RAAR import *
from .RAAR_expert import *
from .GRAAL import *
# from .HAAR import *
# from .DRl import *
from .DRl import *
__all__ = ["AP","HPR","RAAR", "AP_expert", "GRAAL", "RAAR_expert"]
__all__ = ["AP","HPR","RAAR", "AP_expert", "GRAAL", "RAAR_expert","DRl"]
......@@ -35,8 +35,8 @@ import numpy as np
def Phase_graphics(config, output):
algortihm=config['algorithm']
beta0 = config['beta_0']
beta_max = config['beta_max']
#beta0 = config['beta_0']
#beta_max = config['beta_max']
u_0 = config['u_0']
if output['u1'].ndim == 2:
u = output['u1']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment