June 2018
Intermediate to advanced
276 pages
6h 26m
English
The generator takes latent samples as inputs; they are randomly generated numbers, and they are trained to generate images:

For example, to generate a handwritten digit, the generator will be a fully connected network that takes latent samples and generates 784 data points, reshaping them into 28x28 pixel images (MNIST digits). It is highly recommended to use tanh as an activation function:
generator = Sequential([Dense(128, input_shape=(100,)),LeakyReLU(alpha=0.01),Dense(784),Activation('tanh')], name='generator')
Read now
Unlock full access