The generator uses the U-NET architecture in the pseudocode we introduced previously. This recipe is going to cover the practical side of implementing that network.
Spot check! Make sure you have the following files in your working directory:
├── docker │ ├── build.sh │ ├── clean.sh │ └── Dockerfile ├── README.md ├── run.sh └── src | ├── generator.py
Don't pass this step until you've completed the previous recipes and added the generator.py
file to your working directory for the Pix2Pix implementation.
In the generator.py
file, input the following steps into the file to create the network architecture:
#!/usr/bin/env python3 import sys import numpy as np from keras.layers import Dense, Reshape, Input, BatchNormalization, Concatenate from keras.layers.core import Activation from keras.layers.convolutional import UpSampling2D, Convolution2D...