optim_builder
- deepinv.optim.optim_builder(iteration, max_iter=100, params_algo={'g_param': 0.05, 'lambda': 1.0, 'stepsize': 1.0}, data_fidelity=None, prior=None, F_fn=None, g_first=False, bregman_potential=None, **kwargs)[source]
Helper function for building an instance of the
BaseOptim()
class.- Parameters:
iteration (str, deepinv.optim.optim_iterators.OptimIterator) – either the name of the algorithm to be used, or directly an optim iterator. If an algorithm name (string), should be either
"GD"
(gradient descent),"PGD"
(proximal gradient descent),"ADMM"
(ADMM),"HQS"
(half-quadratic splitting),"CP"
(Chambolle-Pock) or"DRS"
(Douglas Rachford).max_iter (int) – maximum number of iterations of the optimization algorithm. Default: 100.
params_algo (dict) – dictionary containing all the relevant parameters for running the algorithm, e.g. the stepsize, regularisation parameter, denoising standart deviation. Each value of the dictionary can be either Iterable (distinct value for each iteration) or a single float (same value for each iteration). See Parameters for more details. Default:
{"stepsize": 1.0, "lambda": 1.0}
.deepinv.optim.DataFidelity (list,) – data-fidelity term. Either a single instance (same data-fidelity for each iteration) or a list of instances of
deepinv.optim.DataFidelity()
(distinct data-fidelity for each iteration). Default:None
.prior (list, deepinv.optim.Prior) – regularization prior. Either a single instance (same prior for each iteration) or a list of instances of deepinv.optim.Prior (distinct prior for each iteration). Default:
None
.F_fn (callable) – Custom user input cost function. default:
None
.g_first (bool) – whether to perform the step on \(g\) before that on \(f\) before or not. Default: False
bregman_potential (deepinv.optim.Bregman) – Bregman potential used for Bregman optimization algorithms such as Mirror Descent. Default:
None
, uses standart Euclidean optimization.kwargs – additional arguments to be passed to the
BaseOptim()
class.
- Returns:
an instance of the
BaseOptim()
class.
Examples using optim_builder
:
Radio interferometric imaging with deepinverse
Image deblurring with custom deep explicit prior.
Random phase retrieval and reconstruction methods.
Image deblurring with Total-Variation (TV) prior
Image inpainting with wavelet prior
Plug-and-Play algorithm with Mirror Descent for Poisson noise inverse problems.
Vanilla PnP for computed tomography (CT).
DPIR method for PnP image deblurring.
Regularization by Denoising (RED) for Super-Resolution.
PnP with custom optimization algorithm (Condat-Vu Primal-Dual)