16.03.2021 Views

Advanced Deep Learning with Keras

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6

Implementation of StackedGAN in Keras

The detailed network model of StackedGAN can be seen in the following figure.

For conciseness, only two encoder-GANs per stack are shown. The figure may

initially appear complex, but it is just a repetition of an encoder-GAN. Meaning

that if we understood how to train one encoder-GAN, the rest uses the same concept.

In the following section, we assume that the StackedGAN is designed for the MNIST

digit generation:

Figure 6.2.2: A StackedGAN is made of a stack of an encoder and GAN. The encoder is pre-trained to

perform classification. Generator 1

, G 1

, learns to synthesize f 1f

features conditioned on the fake label, y f

, and

latent code, z 1f

. Generator 0

, G 0

, produces fake images using both the fake features, f 1f

and latent code, z 0f

.

[ 181 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!