Last active
June 27, 2018 19:17
-
-
Save ravishchawla/5cab89d94f6238e76dbfc1418719ebf6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
model = Sequential(); | |
model.add(Embedding(len(word_dict), max_cap, input_length=max_cap)); | |
model.add(LSTM(100, return_sequences=True)); | |
model.add(LSTM(100)); | |
model.add(Dense(100, activation='relu')); | |
model.add(Dense(2, activation='softmax')); | |
print(model.summary()); | |
optimizer = Adam(lr=0.001, decay=0.0001); | |
model.compile(loss='binary_crossentropy', optimizer=optimizer, metrics=['accuracy']) | |
# fit model | |
model.fit(X_train, Y_train, batch_size=128, epochs=10, validation_data=(X_dev, Y_dev)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment