def __init__(self, config, n_channels=2):
    super(CNNEncoder, self).__init__()
    self.n_channels = n_channels
    decoder_channels = config.decoder_channels
    encoder_channels = config.encoder_channels
    self.down_num = config.down_num
    self.inc = DoubleConv(n_channels, encoder_channels[0])
    self.down1 = Down(encoder_channels[0], encoder_channels[1])
    self.down2 = Down(encoder_channels[1], encoder_channels[2])
    self.width = encoder_channels[(- 1)]
def __init__(self, config, n_channels=2):
    super(CNNEncoder, self).__init__()
    self.n_channels = n_channels
    decoder_channels = config.decoder_channels
    encoder_channels = config.encoder_channels
    self.down_num = config.down_num
    self.inc = DoubleConv(n_channels, encoder_channels[0])
    self.down1 = Down(encoder_channels[0], encoder_channels[1])
    self.down2 = Down(encoder_channels[1], encoder_channels[2])
    self.width = encoder_channels[(- 1)]