Last active
February 23, 2018 20:36
-
-
Save XavKearney/9bdc92b7dff5cb302a654d4617b8aa7e 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 build_model(batch_size, text_len, vocab_size): | |
model = Sequential() | |
model.add(Embedding(vocab_size, 512, batch_input_shape=(batch_size, text_len))) | |
for i in range(3): | |
model.add(LSTM(512, return_sequences=True, stateful=True)) | |
model.add(Dropout(0.2)) | |
model.add(TimeDistributed(Dense(vocab_size))) | |
model.add(Activation('softmax')) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment