Skip to content

Instantly share code, notes, and snippets.

Last active August 7, 2019 02:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
# define model
model = Sequential()
model.add(Embedding(vocab, 50, input_length=30, trainable=True))
model.add(GRU(150, recurrent_dropout=0.1, dropout=0.1))
model.add(Dense(vocab, activation='softmax'))
# compile the model
model.compile(loss='categorical_crossentropy', metrics=['acc'], optimizer='adam')
# fit the model, y_tr, epochs=100, verbose=2, validation_data=(X_val, y_val))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment