optim.PRIDU#
- class bartorch.optim.PRIDU#
Bases:
Primal-dual iteration, looping
PRIDUBlock.- Parameters:
regularizers (Regularizer or ImplicitPrior, or an iterable of them, default=None) – Terms with auxiliary variables extend the optimization variable; the step spans the image and the auxiliary fields behind it, as in
ADMM.maxiter (int, default=30)
step (float, default=0.95) – Step size.
sigma_tau_ratio (float, default=1.0) – Ratio of the dual to the primal step:
sigma = sqrt(step) * ratio,tau = sqrt(step) / ratio. BART’s own reconstructions set it to the factor the data was divided by, so passdata_scaling()’s value to match them.adaptive_step (bool, default=False) – Adapt the steps during the iteration.
eigen (bool, default=False) – Scale the step by the largest eigenvalue of the normal operator, estimated with 30 power iterations.
hogwild (bool, default=False) – Decay the steps by a factor of 0.95 per iteration.
cclambda (float, default=0.0) – Weight of an identity added to the normal operator.
precond (LinearOperator, default=None) – Left preconditioner,
lsqr2_create’sprecond_op: chained onto the normal operator and onto the adjoint, so the iteration seesM(A^H A + lambda) x = M A^H y. Must be positive definite – BART composes it without symmetrizing. BART’s own reconstructions pass none.
- __call__()#
Solve for the image given data
yand encodingA.- 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, withy’s batch in front. A batch is solved one item at a time, each as its own run.- Return type:
torch.Tensor