Creating new butterfly species using a GAN
In this section, we are going to use the same GAN model that we built in the previous section with a minor tweak to generate new species of butterflies.
Since we are following the same steps here, we will keep the description concise and observe the outputs. (The full code can be found in the GitHub repository for this chapter.)
We will first try with the previous architecture that we used for generating food images (which is 4 convolution, 1 fully connected layer, and 5 transposed convolution layers). We will then try another architecture with 5 convolution layers and 5 transposed convolution layers:
- Download the dataset:
dataset_url =Â Â 'https://www.kaggle.com/gpiosenka/butterfly-images40-species' od.download(dataset_url)
- Initialize the variables for the images:
image_size = 64 batch_size = 128 normalize = [(0.5, 0.5, 0.5), (0.5, 0.5, 0.5)] latent_size = 256 butterfly_data_directory = "/content/butterfly...