December 2018
Intermediate to advanced
268 pages
8h 23m
English
When creating a class in any object oriented programming, selecting what variables and quantities are initialized in init is an important step. In this case, we need to know the capacity of the model, the shape of the input, initialize the optimizer, and build the model, as follows:
class Discriminator(object): def __init__(self, width = 28, height= 28, channels = 1, latent_size=100):
self.CAPACITY = width*height*channelsself.SHAPE = (width,height,channels)self.OPTIMIZER = Adam(lr=0.0002, decay=8e-9)
Read now
Unlock full access