Finally, we connect the generator and discriminator into a single model in adversarial form:
class GAN(object):
def __init__(self, discriminator_model,generator_model):
# Initialize Variables
def model(self):
# Build the adversarial model and return it
return model
def summary(self):
# Prints the Model Summary to the Screen
def save_model(self):
# Saves the model structure to a file in the data folder
This skeleton class is meant to demonstrate to you how the similar structure of each of these model types is relative to each other. The advantage of this structure is that we will reuse this class over and over again throughout this book.