DRSIteration
- class deepinv.optim.optim_iterators.DRSIteration(**kwargs)[source]
Bases:
OptimIterator
Iterator for Douglas-Rachford Splitting.
Class for a single iteration of the Douglas-Rachford Splitting (DRS) algorithm for minimising :math:` f(x) + lambda g(x)`.
If the attribute
g_first
is set to False (by default), the iteration is given by\[\begin{split}\begin{equation*} \begin{aligned} u_{k+1} &= \operatorname{prox}_{\gamma f}(z_k) \\ x_{k+1} &= \operatorname{prox}_{\gamma \lambda g}(2*u_{k+1}-z_k) \\ z_{k+1} &= z_k + \beta (x_{k+1} - u_{k+1}) \end{aligned} \end{equation*}\end{split}\]where \(\gamma>0\) is a stepsize and \(\beta>0\) is a relaxation parameter.
If the attribute
g_first
is set to True, the functions \(f\) and \(g\) are inverted in the previous iteration.- forward(X, cur_data_fidelity, cur_prior, cur_params, y, physics)[source]
Single iteration of the DRS algorithm.
- Parameters:
X (dict) – Dictionary containing the current iterate and the estimated cost.
cur_data_fidelity (deepinv.optim.DataFidelity) – Instance of the DataFidelity class defining the current data_fidelity.
cur_prior (deepinv.optim.prior) – Instance of the Prior class defining the current prior.
cur_params (dict) – Dictionary containing the current parameters of the algorithm.
y (torch.Tensor) – Input data.
physics (deepinv.physics) – Instance of the physics modeling the observation.
- Returns:
Dictionary {“est”: (x, z), “cost”: F} containing the updated current iterate and the estimated current cost.