Created
January 12, 2019 18:25
-
-
Save saivarunk/9fae58eb5f74045c8a694304b19ba029 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
def build_bidirectional_model(X, y): | |
# define model | |
model = Sequential() | |
model.add(Bidirectional(LSTM(50, activation='relu'), input_shape=(n_steps, n_features))) | |
model.add(Dense(1)) | |
model.compile(optimizer='adam', loss='mse') | |
# fit model | |
model.fit(X, y, epochs=200, verbose=0) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment