LION.models.learned_regularizer.ACR

Classes

ACR([operator_params, model_parameters])

Adversarial convex regulariser (Mukherjee et al., 2021): as the adversarial regulariser (AR), but convex in the image: an input-convex network plus a small learnable ||x||^2 term.

ICNN_layer(channels[, kernel_size, stride, ...])

A layer of an input-convex network: a non-negative convolution of the previous layer's output plus a convolution of the input, then a convex, non-decreasing activation (leaky ReLU).

L2net([l2_penalty])

softplus(w) * ||x||^2 per sample, with a learnable weight w.

Positive(*args, **kwargs)

A parametrisation keeping a weight non-negative (clipped at 0), for the convex layers.


class LION.models.learned_regularizer.ACR.ACR(operator_params=None, model_parameters=None)[source]

Bases: LIONmodel

Adversarial convex regulariser (Mukherjee et al., 2021): as the adversarial regulariser (AR), but convex in the image: an input-convex network plus a small learnable ||x||^2 term. Trained by ARSolver, used by LearnedRegularizerReconstructor. Takes images.

model_parameters (default_parameters()):

  • channels: the channels of each layer (16);

  • kernel_size, stride: the convolutions’ (5, 1);

  • relu_type: the activation, “LeakyReLU” (the only convex, non-decreasing one supported);

  • layers: the convex layers (5);

  • l2_penalty: the initial w of the softplus(w) ||x||^2 term (-9).

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

initialize_weights(min_val=0.0, max_val=0.001)[source]

Draws the non-negative weights uniformly in [min_val, max_val], as the paper does. Returns the model.

forward(x)[source]

The regulariser’s value for each image of x: (B, 1).

static default_parameters()[source]

The paper’s ACR: 5 convex layers of 16 channels, 5x5 kernels (see the class).

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

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

class LION.models.learned_regularizer.ACR.ICNN_layer(channels, kernel_size=5, stride=1, relu_type='LeakyReLU')[source]

Bases: Module

A layer of an input-convex network: a non-negative convolution of the previous layer’s output plus a convolution of the input, then a convex, non-decreasing activation (leaky ReLU).

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

forward(z, x0)[source]

The layer’s output from the previous one, z, and the network’s input x0.

class LION.models.learned_regularizer.ACR.L2net(l2_penalty=-9.0)[source]

Bases: Module

softplus(w) * ||x||^2 per sample, with a learnable weight w.

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

forward(x)[source]

softplus(w) * ||x||^2 for each image of x: (B, 1).

class LION.models.learned_regularizer.ACR.Positive(*args, **kwargs)[source]

Bases: Module

A parametrisation keeping a weight non-negative (clipped at 0), for the convex layers.

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

forward(X)[source]

X clipped at 0.