We have been using GANs to generate various types of images in the previous chapters. Now, it's time to try generating adversarial examples with GANs and break some models!
Generative adversarial examples
Preparing an ensemble classifier for Kaggle's Cats vs. Dogs
To make our demonstration more similar to practical scenarios, we will train a decent model on Kaggle's Cats vs. Dogs dataset (https://www.kaggle.com/c/dogs-vs-cats), then break the model with adversarial examples generated by GAN. This dataset contains 25,000 training images and 12,500 testing images of either dogs or cats. Here, we will only use the 25,000 training images in our experiment.
For convenience, after downloading the dataset, put images...