optim.ADMM#

class bartorch.optim.ADMM#

Bases:

Alternating direction method of multipliers, looping ADMMBlock.

Parameters:
  • regularizers (Regularizer or ImplicitPrior, or an iterable of them, default=None) – Terms with auxiliary variables – total generalized variation and the two infimal convolutions – walk the image and the fields behind it.

  • maxiter (int, default=30) – A budget on conjugate-gradient iterations across the whole run, not a count of outer steps: admm breaks when nr_invokes > maxiter. Thirty with ten inner iterations is about five outer steps.

  • rho (float, default=0.5) – Penalty parameter; BART’s default is 0.5.

  • cg_maxiter (int, default=10) – Conjugate-gradient iterations per x-update; BART’s default is 10.

  • hogwild (bool, default=False) – BART’s hogwild setting, which doubles rho after ten steps, then twenty, then forty. Not combinable with dynamic_rho, which BART asserts against.

  • cclambda (float, default=0.0) – Weight of an identity added to the normal operator.

  • biases (sequence of tensor, default=None) – The b_j of f_j(G_j x - b_j), one per term, each of its term’s transformed shape.

  • dynamic_rho (bool, default=False) – Move rho with the residuals: up by tau when 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, default=False) – Choose tau from the residuals too, as sqrt(r / s) clipped to [1 / tau_max, tau_max]. Together with dynamic_rho and relative_norm this is the residual balancing of Wohlberg (2017).

  • relative_norm (bool, default=False) – Compare the residuals to their scalings rather than to each other.

  • fast (bool, default=False) – Skip the residuals entirely, and with them the stopping test.

  • alpha (float, default=1.6) – Over-relaxation; BART’s default is 1.6.

  • mu (float, default=3.0) – How far the residuals must part before dynamic_rho moves rho.

  • tau_max (float, default=20.0) – The clip on tau.

  • abstol (float, default=0.0) – Boyd’s absolute and relative tolerances, which stop the iteration when both residuals are inside them. italgo_config sets both to zero, so only the iteration budget stops the run.

  • reltol (float, default=0.0) – Boyd’s absolute and relative tolerances, which stop the iteration when both residuals are inside them. italgo_config sets both to zero, so only the iteration budget stops the run.

  • cg_maxiter_first (int, default=None) – A separate budget for the first step’s inner solve, where there is no warm start to build on; riesling’s, not BART’s.

  • precond (LinearOperator, default=None) – Left preconditioner, lsqr2_create’s precond_op: chained onto the normal operator and onto the adjoint, so the iteration sees M(A^H A + lambda) x = M A^H y. Must be positive definite – BART composes it without symmetrizing. BART’s own reconstructions pass none.

Notes

italgo_config has no way to pass alpha, mu, tau_max, the tolerances, the biases or cg_maxiter_first, so BART’s own loop cannot be given them.

Examples

Several terms, each split off with its own transform:

>>> terms = [priors.TotalVariation((-1, -2), 0.005), priors.L1(0.001)]
>>> x = optim.ADMM(terms, maxiter=30)(kspace, A)
__call__()#

Solve for the image given data y and encoding A.

Parameters:
  • y (torch.Tensor) – Data of A.oshape, recorded for autograd when it requires a gradient.

  • A (LinearOperator) – The encoding. A BART-backed operator is applied without leaving the library; a Python-defined one is called back once per application.

  • x0 (torch.Tensor, default=None) – Warm start of A.ishape; without one the iteration starts at zero.

Returns:

Complex64 solution of A.ishape, with y’s batch in front. A batch is solved one item at a time, each as its own run.

Return type:

torch.Tensor

Examples using ADMM#

Radial SENSE reconstruction

Radial SENSE reconstruction

Dynamic golden-angle radial MRI

Dynamic golden-angle radial MRI

Subspace-constrained T1 mapping

Subspace-constrained T1 mapping