March 2018
Intermediate to advanced
272 pages
7h 53m
English
The generator needs to produce 32 x 32 x 3 images. This requires two slight changes to our network architecture that you can see here:
input = Input(noise_shape)x = Dense(128 * 8 * 8, activation="relu")(input)x = Reshape((8, 8, 128))(x)x = BatchNormalization(momentum=0.8)(x)x = UpSampling2D()(x)x = Conv2D(128, kernel_size=3, padding="same")(x)x = Activation("relu")(x)x = BatchNormalization(momentum=0.8)(x)x = UpSampling2D()(x)x = Conv2D(64, kernel_size=3, padding="same")(x)x = Activation("relu")(x)x = BatchNormalization(momentum=0.8)(x)x = Conv2D(3, kernel_size=3, padding="same")(x)out = Activation("tanh")(x)model = Model(input, out)
Since we need to end at 32, and we will upsample twice, we should begin at 8. This ...