def __init__(self, layers=[16, 32, 64, 128], n_output_channels=5, kernel_size=3, use_skip=True):
    super().__init__()
    self.input_mean = torch.Tensor([0.3521554, 0.30068502, 0.28527516])
    self.input_std = torch.Tensor([0.18182722, 0.18656468, 0.15938024])
    c = 3
    self.use_skip = use_skip
    self.n_conv = len(layers)
    skip_layer_size = ([3] + layers[:(- 1)])
    for (i, l) in enumerate(layers):
        self.add_module(('conv%d' % i), CNNClassifier.Block(c, l, kernel_size, 2))
        c = l
    for (i, l) in list(enumerate(layers))[::(- 1)]:
        self.add_module(('upconv%d' % i), self.UpBlock(c, l, kernel_size, 2))
        c = l
        if self.use_skip:
            c += skip_layer_size[i]
    self.classifier = torch.nn.Conv2d(c, n_output_channels, 1)
def __init__(self, layers=[16, 32, 64, 128], n_output_channels=5, kernel_size=3, use_skip=True):
    super().__init__()
    self.input_mean = torch.Tensor([0.3521554, 0.30068502, 0.28527516])
    self.input_std = torch.Tensor([0.18182722, 0.18656468, 0.15938024])
    c = 3
    self.use_skip = use_skip
    self.n_conv = len(layers)
    skip_layer_size = ([3] + layers[:(- 1)])
    for (i, l) in enumerate(layers):
        self.add_module(('conv%d' % i), CNNClassifier.Block(c, l, kernel_size, 2))
        c = l
    for (i, l) in list(enumerate(layers))[::(- 1)]:
        self.add_module(('upconv%d' % i), self.UpBlock(c, l, kernel_size, 2))
        c = l
        if self.use_skip:
            c += skip_layer_size[i]
    self.classifier = torch.nn.Conv2d(c, n_output_channels, 1)