January 2019
Intermediate to advanced
316 pages
8h 16m
English
As mentioned in the Architecture of DCGAN section, the generator network consists of some 2D convolutional layers, upsampling layers, a reshape layer, and a batch normalization layer. In Keras, every operation can be specified as a layer. Even activation functions are layers in Keras and can be added to a model just like a normal dense layer.
Perform the following steps to create a generator network:
gen_model = Sequential()
gen_model.add(Dense(units=2048))gen_model.add(Activation('tanh'))
Read now
Unlock full access