The training script from Chapter 3, My First GAN in Under 100 Lines, has been modified to accept our new data format, and we have also added some new tricks to ensure that more complicated architecture is able to converge. We'll also fully implement a batch and epoch system for our GAN trainer in this section.
Add the following files, which you'll need to train the GAN:
DCGAN ├── data ├── docker ├── README.md ├── run.sh ├── scripts └── src ├── discriminator.py ├── gan.py ├── generator.py ├── run.py ├── save_to_npy.py └── train.py
The train.py
and run.py
files will drive the training of your DCGAN architecture.
In this section, we'll focus on the training script's key changes.