December 2018
Intermediate to advanced
268 pages
8h 23m
English
The discriminator has typical imports, including sys for file IO and numpy for basic array manipulation within Python. The keras imports are a bit more interesting, as can be seen here:
#!/usr/bin/env python3import sysimport numpy as npfrom keras.layers import Input, Dense, Reshape, Flatten, Dropoutfrom keras.layers.advanced_activations import LeakyReLUfrom keras.models import Sequential, Modelfrom keras.optimizers import Adam
We've imported the layers we will use, including the basic structural layers and a specialized structure called Leaky Rectified Linear Unit (LeakyReLU). We also import the basic structural glue or model structure called Sequential. Finally, we are only using the Adam optimizer in this model example, but we could ...
Read now
Unlock full access