Code implementation – generator
It might seem obvious by now but each of the generators we've built until this point has been an incremental improvement on the last GAN to Deep Convolutional Generative Adversarial Network (DCGAN) to CycleGAN will represent a similar incremental change in the generator code. In this case, we'll downsample for a few blocks then upsample. We'll also introduce a new layer called InstanceNormalization
that the authors used to enforce better training for style transfer.
Getting ready
Every recipe is going to demonstrate the structure that you should have in your directory. This ensures that you've got the right files at each step of the way:
├── data │ ├── ├── docker │ ├── build.sh │ ├── clean.sh │ └── Dockerfile ├── README.md ├── run.sh ├── scripts │ └── create_data.sh ├── src │ ├── generator.py
How to do it....
With the generator, we will replicate the paper with the number of filters and the block style.
These are the steps for this:
- Imports will match...