Skip to content

Instantly share code, notes, and snippets.

@notha99y
Created November 26, 2018 09:41
Show Gist options
  • Save notha99y/daee4d6e9c0e3e475071cc1ecc73afdd to your computer and use it in GitHub Desktop.
Save notha99y/daee4d6e9c0e3e475071cc1ecc73afdd to your computer and use it in GitHub Desktop.
def simple_LSTM():
np.random.seed(7)
model = Sequential(name = 'simple_LSTM')
model.add(LSTM(512, input_shape=(None, 6), recurrent_dropout=0.5))
model.add(Dense(len(activities), activation='softmax'))
model.compile(loss='categorical_crossentropy', optimizer=Adam(lr=1e-4), metrics=['accuracy'])
print(model.summary())
return model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment