Created
February 15, 2018 15:55
-
-
Save TheLoneNut/ef194733d7d9c7dc4a2743605f0b6753 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_base_network(in_dims, out_dims): | |
""" | |
Base network to be shared. | |
""" | |
model = Sequential() | |
model.add(BatchNormalization(input_shape=in_dims)) | |
model.add(LSTM(512, return_sequences=True, dropout=0.2, recurrent_dropout=0.2, implementation=2)) | |
model.add(LSTM(512, return_sequences=False, dropout=0.2, recurrent_dropout=0.2, implementation=2)) | |
model.add(BatchNormalization()) | |
model.add(Dense(512, activation='relu')) | |
model.add(BatchNormalization()) | |
model.add(Dense(out_dims, activation='relu')) | |
model.add(BatchNormalization()) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment