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]#
Forward pass of the primal block.
- Parameters:
x (torch.Tensor) – current primal variable.
Atu (torch.Tensor) – backprojected dual variable.
- Returns:
(
torch.Tensor
) the current primal variable.