Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def _build_generator_model(self):
generator_input = Input(shape=(self.generator_input_dim,))
generator_seqence = Sequential(
[Dense(256, input_dim=self.generator_input_dim),
LeakyReLU(alpha=0.2),
BatchNormalization(momentum=0.8),
Dense(512),
LeakyReLU(alpha=0.2),
BatchNormalization(momentum=0.8),
Dense(1024),
LeakyReLU(alpha=0.2),
BatchNormalization(momentum=0.8),
Dense(np.prod(self.img_shape), activation='tanh'),
Reshape(self.img_shape)])
generator_output_tensor = generator_seqence(generator_input)
self.generator_model = Model(generator_input, generator_output_tensor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment