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]#
Forward pass of the dual block.
- Parameters:
u (torch.Tensor) – current dual variable.
Ax_cur (torch.Tensor) – projection of the primal variable.
y (torch.Tensor) – measurements.