LION.models.CNNs.MSDNet

Classes

MSDNet([model_parameters])

Mixed-Scale Dense network (Pelt and Sethian, 2018): a deep, narrow network of dilated convolutions, every layer seeing the channels of all the layers before it, ending in a 1x1 convolution.

MSD_Layer(in_channels, width, dilations, ...)

One layer of MSDNet: width 3x3 convolutions with their own dilations, each on all of the layer's input channels, each followed by batch normalisation and activation.


class LION.models.CNNs.MSDNet.MSDNet(model_parameters=None)[source]

Bases: LIONmodel

Mixed-Scale Dense network (Pelt and Sethian, 2018): a deep, narrow network of dilated convolutions, every layer seeing the channels of all the layers before it, ending in a 1x1 convolution. Takes images (e.g. a reconstruction).

model_parameters (default_parameters()):

  • in_channels: the input image’s channels (1);

  • width: the channels each layer adds (1);

  • depth: the number of layers (100);

  • dilations: one per convolution, width * depth of them, layer by layer (1 to 10, repeated);

  • look_back_depth: how many earlier layers each layer sees (-1: all);

  • final_look_back_depth: how many layers the final 1x1 convolution sees (-1: all, and the input);

  • activation: a torch.nn class name (“ReLU”) or module.

The network for model_parameters (default_parameters() if None).

forward(x)[source]

The network’s output image for the images x (B, in_channels, H, W).

static default_parameters()[source]

The paper’s network: 100 layers of width 1, dilations 1 to 10, every layer seeing all earlier ones (see the class).

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

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

class LION.models.CNNs.MSDNet.MSD_Layer(in_channels, width, dilations, activation)[source]

Bases: Module

One layer of MSDNet: width 3x3 convolutions with their own dilations, each on all of the layer’s input channels, each followed by batch normalisation and activation. Its output is its input with the new channels appended.

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

forward(x)[source]

x with the width new channels appended.