Great! @albanD  here the minimal code very simple: it defines the DnCNN networks (the one in  https://github.com/cszn/DnCNN/blob/master/TrainingCodes/dncnn_pytorch/main_train.py) and then instantiate it. The code is below but cannot succeed to get nice print
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
    
class DnCNN(nn.Module):
    def __init__(self, depth=17, n_channels=64, image_channels=1, use_bnorm=True, kernel_size=3):
        super(DnCNN, self).__init__()
        kernel_size = 3
        padding = 1
        layers = []

        layers.append(nn.Conv2d(in_channels=image_channels, out_channels=n_channels, kernel_size=kernel_size, padding=padding, bias=True))
        layers.append(nn.ReLU(inplace=True))
        for _ in range(depth-2):
            layers.append(nn.Conv2d(in_channels=n_channels, out_channels=n_channels, kernel_size=kernel_size, padding=padding, bias=False))
            layers.append(nn.BatchNorm2d(n_channels, eps=0.0001, momentum = 0.95))
            layers.append(nn.ReLU(inplace=True))
        layers.append(nn.Conv2d(in_channels=n_channels, out_channels=image_channels, kernel_size=kernel_size, padding=padding, bias=False))
        self.dncnn = nn.Sequential(*layers)
        self._initialize_weights()
        print("DnCNN init done")

    def forward(self, x):
        y = x
        out = self.dncnn(x)
        return y-out

    def _initialize_weights(self):
        for m in self.modules():
            if isinstance(m, nn.Conv2d):
                print('Conv init weight...',m.weight.size())
                init.orthogonal_(m.weight)
                print('Ok')
                print('m.bias=', m.bias)
                if m.bias is not None:
                    print('Conv init bias...')
                    init.constant_(m.bias, 0)
                    print('Ok')
            elif isinstance(m, nn.BatchNorm2d):
                print('BN init weight...')
                init.constant_(m.weight, 1)
                print('BN init bias...')
                init.constant_(m.bias, 0)
                print('Ok')

model = DnCNN()