LION.models.iterative_unrolled.LPD

Classes

LPD(operator_params[, model_parameters])

Learned Primal-Dual (Adler and Öktem, 2018): n_iters iterations, each a dual step (a CNN of the dual, the projection of the primal and the measurements) and a primal step (a CNN of the primal and the backprojection of the dual).

RegProximal(layers, channels, conv_bias[, ...])

The primal (regularisation) block of LPD: as dataProximal, on the primal side.

dataProximal(layers, channels, conv_bias[, ...])

The dual (data) block of LPD: 3x3 convolutions with PReLUs through the channels listed, the last a 1x1 convolution; optional instance normalisation.


class LION.models.iterative_unrolled.LPD.LPD(operator_params, model_parameters=None)[source]

Bases: LIONmodel

Learned Primal-Dual (Adler and Öktem, 2018): n_iters iterations, each a dual step (a CNN of the dual, the projection of the primal and the measurements) and a primal step (a CNN of the primal and the backprojection of the dual). The primal starts from the initial reconstruction (the operator’s default, FDK for CT, unless set). Works with any operator with autograd(). Takes the measurements.

model_parameters (default_parameters()):

  • n_iters: the iterations (10);

  • data_channels: the dual block’s channels, a list: from n_dual + 2 to n_dual ([7, 32, 32, 5]);

  • reg_channels: the primal block’s channels: from n_primal + 1 to n_primal ([6, 32, 32, 5]);

  • learned_step: learn each iteration’s step size (False);

  • step_size: its initial value (None: 1 / ||A||, by the power method);

  • step_positive: keep the learned step positive (False);

  • instance_norm: instance normalisation in the blocks (False);

  • conv_bias: biases in the convolutions (True);

  • dual_step_primal_channel: the primal channel projected in the dual step (1, as in the paper).

Initialize internal Module state, shared by both nn.Module and ScriptModule.

static default_parameters()[source]

The paper’s LPD: 10 iterations of 3-layer blocks of 32 channels, 5 primal and 5 dual channels (see the class).

static continous_LPD_paper()[source]

The LPD that cLPD’s paper (Runkel et al., 2024) compares with: 5 iterations of 4-layer blocks, learned positive steps, instance normalisation, no biases.

static cite(cite_format='bib')[source]

Where LPD comes from: its citation, BibTeX (“bib”) or “MLA”.

forward(g)[source]

The reconstructions of the measurements g (B, 1, …), of the operator’s range shape.

class LION.models.iterative_unrolled.LPD.RegProximal(layers, channels, conv_bias, instance_norm=False)[source]

Bases: Module

The primal (regularisation) block of LPD: as dataProximal, on the primal side.

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

The block’s update of the primal variables, from x (the primal and the backprojected dual).

class LION.models.iterative_unrolled.LPD.dataProximal(layers, channels, conv_bias, instance_norm=False)[source]

Bases: Module

The dual (data) block of LPD: 3x3 convolutions with PReLUs through the channels listed, the last a 1x1 convolution; optional instance normalisation.

Initialize internal Module state, shared by both nn.Module and ScriptModule.

forward(x)[source]

The block’s update of the dual variables, from x (the dual, the projected primal and the measurements).