Created
April 24, 2019 20:27
-
-
Save alinazhanguwo/44e20b3fc438e5658a738b1585d9575f to your computer and use it in GitHub Desktop.
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
embed_dim = 128 | |
lstm_out = 196 | |
model = Sequential() | |
model.add(Embedding(max_fatures, embed_dim,input_length = X.shape[1])) | |
model.add(SpatialDropout1D(0.4)) | |
model.add(LSTM(lstm_out, dropout=0.2, recurrent_dropout=0.2)) | |
model.add(Dense(3,activation='softmax')) | |
model.compile(loss = 'categorical_crossentropy', optimizer='adam',metrics = ['accuracy']) | |
print(model.summary()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment