PDNet_PrimalBlock
- class deepinv.models.PDNet_PrimalBlock(in_channels=6, out_channels=5, depth=3, bias=True, nf=32)[source]
Bases:
Module
Primal block for the Primal-Dual unfolding model.
From https://arxiv.org/abs/1707.06474.
Primal variables are images of shape (batch_size, in_channels, height, width). The input of each primal block is the concatenation of the current primal variable and the backprojected dual variable along the channel dimension. The output of each primal block is the current primal variable.
- Parameters:
in_channels (int) – number of input channels. Default: 6.
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(x, Atu)[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_PrimalBlock
:
Learned Primal-Dual algorithm for CT scan.