PDNet_DualBlock

class deepinv.models.PDNet_DualBlock(in_channels=7, out_channels=5, depth=3, bias=True, nf=32)[source]

Bases: Module

Dual block for the Primal-Dual unfolding model.

From https://arxiv.org/abs/1707.06474.

Dual variables are images of shape (batch_size, in_channels, height, width). The input of each primal block is the concatenation of the current dual variable with the projected primal variable and the measurements. The output of each dual block is the current primal variable.

Parameters:
  • in_channels (int) – number of input channels. Default: 7.

  • out_channels (int) – number of output channels. Default: 5.

  • depth (int) – number of convolutional layers in the block. Default: 3.

  • bias (bool) – whether to use bias in convolutional layers. Default: True.

  • nf (int) – number of features in the convolutional layers. Default: 32.

forward(u, Ax_cur, y)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Examples using PDNet_DualBlock:

Learned Primal-Dual algorithm for CT scan.

Learned Primal-Dual algorithm for CT scan.