optim.IST#
- class bartorch.optim.IST#
Bases:
Iterative soft thresholding (proximal gradient), looping
ISTBlock.Solves \(\min_x \tfrac12 \| A x - y \|^2 + g(x)\).
- Parameters:
regularizers (Regularizer or ImplicitPrior, default=None) – The single term \(g\); its transform must be the identity.
maxiter (int, default=30) – Number of iterations.
step (float, default=0.95) – Step size \(\tau\) of the gradient step.
eigen (bool, default=False) – Divide the step by
maxeigen()of the normal operator.hogwild (bool, default=False) – Must be false: BART’s IST rejects it.
cclambda (float, default=0.0) – Weight of an identity added to the normal operator.
precond (LinearOperator, default=None) – Left preconditioner \(M\) from
A.ishapeto itself, positive definite (lsqr2_create’sprecond_op); BART’s reconstructions use none.
- Raises:
ValueError – Not exactly one term, or
hogwild; at the call, a term whose transform is not the identity, such asTotalVariation.TypeError – A term with auxiliary variables.
- __call__()#
Solve for the image.
- Parameters:
y (tensor) – Data of
A.oshape, or(batch, *A.oshape); a batch is solved one item at a time, each as its own run.A (LinearOperator) – Encoding operator. A BART-backed operator is applied inside the library; a Python-defined one is called back once per application.
x0 (tensor, default=None) – Starting image of
A.ishape, or one per batch item; zero when omitted.
- Returns:
Complex64 image of
A.ishape, withy’s batch axis in front.- Return type:
torch.Tensor
- Raises:
ValueError –
yrequires a gradient and a BART term has not been detached (detach()): its proximal operator has no backward pass.
Notes
The iterations are torch operations, so a solve is differentiated by unrolling. Step sizes and weights are fixed;
bartorch.optim’s blocks andUnrolledexpose them as parameters.