Code implementation – generator
In this case, the generator in also known as the refiner network. This generator, therefore, is the networkthat will take and refine the simulated data.
Getting ready
Check that you have the following files in the correct place:
├── data ├── docker │ ├── build.sh │ ├── clean.sh │ ├── Dockerfile │ └── kaggle.json ├── out ├── README.md ├── run.sh └── src ├── generator.py loss.py
How to do it...
In this section, we'll look at build boilerplate items, model development, and helper functions in order to help us to build the full generator.
Boilerplate items
There are two key steps in the boilerplate, and they are as follows:
- Add all of the following import statements needed to create the generator (refiner) network:
#!/usr/bin/env python import sys import numpy as np from keras.layers import Dense, Reshape, Input, BatchNormalization, Concatenate, Activation from keras.layers.core import Activation from keras.layers.convolutional import UpSampling2D, Convolution2D...