def __init__()

in models/layers.py [0:0]


    def __init__(self, in_channel, out_channel, upsample=False, downsample=False):
        super().__init__()

        assert not (upsample and downsample), 'Cannot upsample and downsample simultaneously'
        mid_ch = in_channel if downsample else out_channel

        self.conv1 = ConvLayer2d(in_channel, mid_ch, upsample=upsample, kernel_size=3)
        self.conv2 = ConvLayer2d(mid_ch, out_channel, downsample=downsample, kernel_size=3)

        if (in_channel != out_channel) or upsample or downsample:
            self.skip = ConvLayer2d(
                in_channel,
                out_channel,
                upsample=upsample,
                downsample=downsample,
                kernel_size=1,
                activate=False,
                bias=False,
            )