Created
March 30, 2020 08:45
-
-
Save vivekpadia70/0f57b8ea062b2f7c3a973bb9b2acafbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_generator(): | |
model = tf.keras.Sequential() | |
# creating Dense layer with units 7*7*256(batch_size) and input_shape of (100,) | |
model.add(layers.Dense(7*7*256, use_bias=False, input_shape=(100,))) | |
model.add(layers.BatchNormalization()) | |
model.add(layers.LeakyReLU()) | |
model.add(layers.Reshape((7, 7, 256))) | |
model.add(layers.Conv2DTranspose(128, (5, 5), strides=(1, 1), padding='same', use_bias=False)) | |
model.add(layers.BatchNormalization()) | |
model.add(layers.LeakyReLU()) | |
model.add(layers.Conv2DTranspose(64, (5, 5), strides=(2, 2), padding='same', use_bias=False)) | |
model.add(layers.BatchNormalization()) | |
model.add(layers.LeakyReLU()) | |
model.add(layers.Conv2DTranspose(1, (5, 5), strides=(2, 2), padding='same', use_bias=False, activation='tanh')) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment