optim.POCSBlock#
- class bartorch.optim.POCSBlock#
Bases:
ModuleOne sweep of projections onto convex sets, BART’s
pocs(italgos.c).A step applies every projection in turn; there is no step size, momentum or residual, so the state is the iterate alone. The projections carry the data and the encoding – for
pocsense, the measured samples, the range of the coil sensitivities and a sparsity threshold – soAis accepted and ignored, giving the block the calling convention of the others forbartorch.learning.Unrolled.- Parameters:
projections (sequence) – Applied in the order given. Each is a callable mapping a tensor to a tensor, or a
bartorch.priorsterm, applied as its proximal operator at unit step.- Raises:
TypeError – A projection is neither callable nor a term.
ValueError –
projectionsis empty.
Examples
>>> block = POCSBlock([consistency, sense, sparsity]) >>> state = block.start(kspace) >>> state = block(state) >>> block.output(state)
- start()#
Initial state:
x0, or zero ofy’s shape, aspocs_recon2starts.yfixes the shape, dtype and device of the zero start; its values are not read.
- forward()#
Apply every projection once; returns the next state.
- output()#
The iterate as the last projection left it.