PDNet_DualBlock#
- class deepinv.models.PDNet_DualBlock(in_channels=7, out_channels=5, depth=3, bias=True, nf=32, dim=2)[source]#
Bases:
ModuleDual block for the Primal-Dual unfolding model.
from Adler and Γktem[1].
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.
dim (str, int) β Whether to build 2D or 3D network (if str, can be β2β, β2dβ, β3Dβ, etc.)
- References:
- 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.