def __init__(self, config): super(Deep240pTo480p.Generator, self).__init__() initial_filters = 1024 // 4 self.blocks = [ ConvBlock(initial_filters * 1, 5, 1), ConvBlock(initial_filters * 2, 5, 1), DeconvBlock(initial_filters * 4, 5, 2), ConvBlock(initial_filters * 2, 5, 1), ConvBlock(initial_filters * 1, 5, 1), ] self.final_conv = Conv(3 if config.has_colored_target else 1, 5, 1) self._low_res_generator = None
def __init__(self, config): super(Deep128NoiseMsDiscS2Alternative.Generator, self).__init__() initial_filters = int(512 / 32) * 1 self.fc = tf.keras.layers.Dense(8 * 8 * 64, use_bias=False) self.initial_norm = tf.keras.layers.BatchNormalization() self.blocks = [ DeconvBlock(initial_filters * 32, 5, 2), # ConvBlock(initial_filters*16*2, 5, 1), DeconvBlock(initial_filters * 16, 5, 2), # ConvBlock(initial_filters*8*2, 5, 1), DeconvBlock(initial_filters * 8, 5, 2), # ConvBlock(initial_filters*4*2, 5, 1), DeconvBlock(initial_filters * 4, 5, 2), # ConvBlock(initial_filters*2*2, 5, 1), ] self.final_conv = Conv(3 if config.has_colored_target else 1, 5, 1)