LION.models.iterative_unrolled.LG

Classes

LG(operator_params[, model_parameters])

Learned Gradient (Adler and Öktem, 2017): n_iters updates of the image, each a CNN of the image, a memory and the data-fit gradient Aᵀ(y - A x), with learned step sizes; with tv, also of a TV gradient (LGTV).

LGblock(channels)

A learned-gradient block: 3x3 convolutions through the channels listed, with ReLUs between them.


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

Bases: LIONmodel

Learned Gradient (Adler and Öktem, 2017): n_iters updates of the image, each a CNN of the image, a memory and the data-fit gradient Aᵀ(y - A x), with learned step sizes; with tv, also of a TV gradient (LGTV). Starts from the initial reconstruction. Takes the measurements.

model_parameters (default_parameters()):

  • channels: each block’s channels, a list: its input (the image, the memory, the gradient, and the TV gradient with tv) to its output (the memory, then the update); [7, 32, 32, 6];

  • n_iters: the iterations (5);

  • tv: also give each block a TV gradient, with a learned step size (LGTV; False, as the paper). LG.lgtv_parameters() are LGTV’s.

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

static default_parameters()[source]

5 iterations of blocks of 32 channels, a memory of 5 channels, no TV gradient (see the class).

static lgtv_parameters()[source]

LGTV: LG whose blocks also get a TV gradient (tv), as in Kiss et al., 2025 (see the class).

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

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

gradientTVnorm2D(f)[source]

The gradient of the (smoothed) isotropic total variation of the images f (B, C, H, W).

forward(x)[source]

The reconstructions of the measurements x (B, 1, …).

class LION.models.iterative_unrolled.LG.LGblock(channels)[source]

Bases: Module

A learned-gradient block: 3x3 convolutions through the channels listed, with ReLUs between them.

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

forward(x)[source]

The block’s output for x.