As you can see, the Generator base class is similar to the Discriminator:
class Generator(object):
def __init__(self, width = 28, height= 28, channels = 1,
latent_size=100):
# Initialize Variables
def model(self):
# Build the generator model and returns 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
The main difference will be in the different init and model statements when we get to that recipe. The generator is a simple sequential model. The sequential model just represents a way of constructing and connecting layers in a neural network together.