Created
February 6, 2019 09:51
-
-
Save prateekjoshi565/c9b71f12bbf1849ecc7f5e76d61f24a8 to your computer and use it in GitHub Desktop.
Model Architecture
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
# build NMT model | |
def build_model(in_vocab,out_vocab, in_timesteps,out_timesteps,n): | |
model = Sequential() | |
model.add(Embedding(in_vocab, n, input_length=in_timesteps, | |
mask_zero=True)) | |
model.add(LSTM(n)) | |
model.add(RepeatVector(out_timesteps)) | |
model.add(LSTM(n, return_sequences=True)) | |
model.add(Dense(out_vocab, activation='softmax')) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment