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.

Disentangled Representation GANs

Figures 6.2.9 to 6.2.11 demonstrate that the StackedGAN has provided additional

control on the attributes of the generator outputs. The control and attributes are

(label, which digit), (z0, digit thickness), and (z1, digit tilt). From this example,

there are other possible experiments that we can control such as:

• Increasing the number of elements of the stack from the current 2

• Decreasing the dimension of codes z0 and z1, like in InfoGAN

Following figure shows the differences between the latent codes of InfoGAN and

StackedGAN. The basic idea of disentangling codes is to put a constraint on the

loss functions such that only specific attributes are affected by a code. Structure-wise,

InfoGAN are easier to implement when compared to StackedGAN. InfoGAN is also

faster to train:

Figure 6.2.12: Latent representations for different GANs

Conclusion

In this chapter, we've discussed how to disentangle the latent representations

of GANs. Earlier on in the chapter, we discussed how InfoGAN maximizes the

mutual information in order to force the generator to learn disentangled latent

vectors. In the MNIST dataset example, InfoGAN uses three representations and

a noise code as inputs. The noise represents the rest of the attributes in the form

of an entangled representation. StackedGAN approaches the problem in a different

way. It uses a stack of encoder-GANs to learn how to synthesize fake features

and images. The encoder is first trained to provide a dataset of features. Then,

the encoder-GANs are trained jointly to learn how to use the noise code to control

attributes of the generator output.

In the next chapter, we will embark on a new type of GAN that is able to generate

new data in another domain. For example, given an image of a horse, the GAN

can perform an automatic transformation to an image of a zebra. The interesting

feature of this type of GAN is that it can be trained without supervision.

[ 200 ]

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

Saved successfully!

Ooh no, something went wrong!