Skip to content

Instantly share code, notes, and snippets.

@farizrahman4u
Created March 2, 2019 08:16
Show Gist options
  • Save farizrahman4u/bc06eb9471bd42153dba0dfa4c65098d to your computer and use it in GitHub Desktop.
Save farizrahman4u/bc06eb9471bd42153dba0dfa4c65098d to your computer and use it in GitHub Desktop.
from keras.layers import *
from keras.models import *
from utils import max_len, max_words
def get_model():
model = Sequential()
model.add(Embedding(max_words, 128))
model.add(GRU(128))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
return model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment