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

2. Varying the first noise code, z 0

, as a constant vector from -4.0 to 4.0 for digits

0 to 9 as shown as follows. The second noise code, z 0

, is set to zero vector.

Figure 6.2.10 shows that the first noise code controls the thickness of the digit.

For example, for digit 8:

python3 stackedgan-mnist-6.2.1.py

--generator0=stackedgan_mnist-gen0.h5

--generator1=stackedgan_mnist-gen1.h5 --z0=0 --z1=0 –p0

--digit=8

3. Varying the second noise code, z 1

, as a constant vector from -1.0 to 1.0 for

digits 0 to 9 shown as follows. The first noise code, z 0

, is set to zero vector.

Figure 6.2.11 shows that the second noise code controls the rotation (tilt)

and to a certain extent the thickness of the digit. For example, for digit 8:

python3 stackedgan-mnist-6.2.1.py

--generator0=stackedgan_mnist-gen0.h5

--generator1=stackedgan_mnist-gen1.h5 --z0=0 --z1=0 –p1

--digit=8

Figure 6.2.9: Images generated by StackedGAN as the discrete code is varied from 0 to 9. Both z

0 and z

1 have

been sampled from a normal distribution with zero mean and 0.5 standard deviation.

[ 198 ]

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

Saved successfully!

Ooh no, something went wrong!