December 2018
Intermediate to advanced
268 pages
8h 23m
English
The model is the heart of each of these classes. In this case, we are defining a model that is going to take a sample from the latent space as an input and use it to produce an image with the same shape as the original image. Let's break down this model code to understand how this is happening:
def model(self, block_starting_size=128,num_blocks=4): model = Sequential()
block_size = block_starting_size model.add(Dense(block_size, input_shape=(self.LATENT_SPACE_SIZE,)))model.add(LeakyReLU(alpha=0.2))model.add(BatchNormalization(momentum=0.8))
This adds a dense ...
Read now
Unlock full access