GSDRUNet

class deepinv.models.GSDRUNet(alpha=1.0, in_channels=3, out_channels=3, nb=2, nc=[64, 128, 256, 512], act_mode='E', pretrained=None, device=device(type='cpu'))[source]

Bases:

Gradient Step Denoiser with DRUNet architecture

Parameters:
  • alpha (float) – Relaxation parameter

  • in_channels (int) – Number of input channels

  • out_channels (int) – Number of output channels

  • nb (int) – Number of blocks in the DRUNet

  • nc (list) – Number of channels in the DRUNet

  • act_mode (str) – activation mode, “R” for ReLU, “L” for LeakyReLU “E” for ELU and “S” for Softplus.

  • downsample_mode (str) – Downsampling mode, “avgpool” for average pooling, “maxpool” for max pooling, and “strideconv” for convolution with stride 2.

  • upsample_mode (str) – Upsampling mode, “convtranspose” for convolution transpose, “pixelsuffle” for pixel shuffling, and “upconv” for nearest neighbour upsampling with additional convolution.

  • download (bool) – use a pretrained network. If pretrained=None, the weights will be initialized at random using Pytorch’s default initialization. If pretrained='download', the weights will be downloaded from an online repository (only available for the default architecture). Finally, pretrained can also be set as a path to the user’s own pretrained weights. See pretrained-weights for more details.

  • train (bool) – training or testing mode.

  • device (str) – gpu or cpu.

Examples using GSDRUNet:

Regularization by Denoising (RED) for Super-Resolution.

Regularization by Denoising (RED) for Super-Resolution.