List of Listings

Chapter 2. Intro to generative modeling with autoencoders

Listing 2.1. Standard imports

Listing 2.2. Setting hyperparameters

Listing 2.3. Creating the encoder

Listing 2.4. Creating the sampling helper function

Listing 2.5. Writing the decoder

Listing 2.6. Combining the model

Listing 2.7. Defining our loss function

Listing 2.8. Creating the train/test split

Chapter 3. Your first GAN: Generating handwritten digits

Listing 3.1. Import statements

Listing 3.2. Model input dimensions

Listing 3.3. Generator

Listing 3.4. Discriminator

Listing 3.5. Building and compiling the GAN

Listing 3.6. GAN training loop

Listing 3.7. Displaying generated images

Listing 3.8. Running the model

Chapter 4. Deep Convolutional GAN

Listing 4.1. Import statements

Listing 4.2. Model input dimensions

Listing 4.3. DCGAN Generator

Listing 4.4. DCGAN Discriminator

Listing 4.5. Building and compiling the DCGAN

Listing 4.6. DCGAN training loop

Listing 4.7. Displaying generated images

Listing 4.8. Running the model

Chapter 6. Progressing with GANs

Listing 6.1. Progressive growing and smooth upscaling

Listing 6.2. Mini-batch standard deviation

Listing 6.3. Equalized learning rate

Listing 6.4. Pixel-wise feature normalization

Listing 6.5. Getting started with TFHub

Chapter 7. Semi-Supervised GAN

Listing 7.1. Import statements

Listing 7.2. Model input dimensions

Listing 7.3. Dataset for training and testing

Listing 7.4. SGAN Generator

Listing 7.5. SGAN Discriminator

Listing 7.6. SGAN Discriminator: supervised

Listing 7.7. SGAN Discriminator: unsupervised

Listing 7.8. Building the models

Listing 7.9. SGAN training algorithm

Listing 7.10. Training the model

Listing 7.11. Checking the accuracy

Listing 7.12. Fully supervised classifier

Chapter 8. Conditional GAN

Listing 8.1. Import statements

Listing 8.2. Model input dimensions

Listing 8.3. CGAN Generator

Listing 8.4. CGAN Discriminator

Listing 8.5. Building and compiling the CGAN model

Listing 8.6. CGAN training loop

Listing 8.7. Displaying generated images

Chapter 9. CycleGAN

Listing 9.1. Import all the things

Listing 9.2. Starting the CycleGAN class

Listing 9.3. Building the networks

Listing 9.4. Building the generator

Listing 9.5. Building the Discriminator

Listing 9.6. Training CycleGAN

Chapter 10. Adversarial examples

Listing 10.1. Our trusty imports

Listing 10.2. Helper function

Listing 10.3. Creating tables 10.1 and 10.2

Listing 10.4. Gaussian noise

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset