Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am adamkusey on github.
  • I am adak (https://keybase.io/adak) on keybase.
  • I have a public key ASAUZ0VdBbrGfZEYozec-UByuI_dH4WA2bvZp2GqiGesSAo

To claim this, I am signing this object:

@adamkusey
adamkusey / securitai-lstm-model.py
Last active Jun 2, 2018
SecuritAI LSTM RNN Model
View securitai-lstm-model.py
model = Sequential()
model.add(Embedding(num_words, 32, input_length=max_log_length))
# Prevent overfitting using dropout method of regularization
model.add(Dropout(0.5))
model.add(LSTM(64, recurrent_dropout=0.5))
model.add(Dropout(0.5))
# Condense to single binary output value
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# Training set automatically split 75/25 to check validation loss/accuracy at each epoch