bartorch.optim.ADMM#
- class bartorch.optim.ADMM(regularizers=None, *, maxiter=30, rho=0.5, cg_maxiter=10, hogwild=False, cclambda=0.0, biases=None, dynamic_rho=False, dynamic_tau=False, relative_norm=False, fast=False, alpha=1.6, mu=3.0, tau_max=20.0, abstol=0.0, reltol=0.0, cg_maxiter_first=None, precond=None)#
Alternating direction method of multipliers (
pics --admm).- Parameters:
regularizers (Regularizer or iterable of Regularizer, optional) – Terms from
bartorch.prox.maxiter (int)
rho (float) – Penalty parameter (
pics -u); 0.5 is BART’s default.cg_maxiter (int) – Conjugate-gradient iterations per step (
pics -C); 10 is BART’s default.hogwild (bool) – BART’s
hogwildsetting (pics -H), which doublesrhoafter ten steps, then twenty, then forty. Not combinable withdynamic_rho, which BART asserts against.cclambda (float) – Weight of an identity added to the normal operator (
pics -q).biases (sequence of tensor, optional) – The
b_joff_j(G_j x - b_j), one per term, each of its term’s transformed shape.dynamic_rho (bool) – Move
rhowith the residuals (pics --admm_dynamic_rho): up bytauwhen the primal residual leads, down when the dual does. The dual variables are rescaled to match, so the split stays where it was.dynamic_tau (bool) – Choose
taufrom the residuals too (pics --admm_dynamic_tau), assqrt(r / s)clipped to[1 / tau_max, tau_max]. Together withdynamic_rhoandrelative_normthis is the residual balancing of Wohlberg (2017).relative_norm (bool) – Compare the residuals to their scalings rather than to each other (
pics --admm_relative_norm).fast (bool) – Skip the residuals entirely, and with them the stopping test.
alpha (float) – Over-relaxation; BART’s default of 1.6 is what
picsruns. Out of reach ofin_library(), whichitalgo_configgives no way to set.mu (float) – How far the residuals must part before
dynamic_rhomovesrho. Out of reach ofin_library().tau_max (float) – The clip on
tau. Out of reach ofin_library().abstol (float) – Boyd’s absolute and relative tolerances, which stop the iteration when both residuals are inside them.
italgo_configsets both to zero, whateveriter_admm_defaultssays, so the budget is what stopspics; these are out of reach ofin_library().reltol (float) – Boyd’s absolute and relative tolerances, which stop the iteration when both residuals are inside them.
italgo_configsets both to zero, whateveriter_admm_defaultssays, so the budget is what stopspics; these are out of reach ofin_library().cg_maxiter_first (int, optional) – A separate budget for the first step’s inner solve. Not BART’s – it is riesling’s
iters0, the one thing that implementation has that BART’s does not – so it is out of reach ofin_library()as well.
- __init__(regularizers=None, *, maxiter=30, rho=0.5, cg_maxiter=10, hogwild=False, cclambda=0.0, biases=None, dynamic_rho=False, dynamic_tau=False, relative_norm=False, fast=False, alpha=1.6, mu=3.0, tau_max=20.0, abstol=0.0, reltol=0.0, cg_maxiter_first=None, precond=None)#
Methods
__init__([regularizers, maxiter, rho, ...])fixed_point(image_shape, *[, trainable])Refused: the fixed point of an alternating-direction step is not in
x.in_library(y, A[, x0])BART's own loop, which cannot be given everything this solver takes.
unrolled(image_shape, *[, trainable])This solver as a network of
maxitersteps, trained end to end.