Skip to content

Instantly share code, notes, and snippets.

Created Mar 25, 2018
What would you like to do?
# Define network architecture and compile
model = Sequential()
model.add(Embedding(num_words, 50, input_length=200))
model.add(LSTM(100, dropout=0.2, recurrent_dropout=0.2))
model.add(Dense(250, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment