Skip to content

Instantly share code, notes, and snippets.

@scientist1642
Created December 5, 2016 22:58
Show Gist options
  • Save scientist1642/f6c291f0e40e2409436c883e1d6c8f16 to your computer and use it in GitHub Desktop.
Save scientist1642/f6c291f0e40e2409436c883e1d6c8f16 to your computer and use it in GitHub Desktop.
x_train = np.reshape(x_train,(x_train.shape[0],x_train.shape[1], 1))
x_test = np.reshape(x_test,(x_test.shape[0],x_test.shape[1], 1))
model = Sequential()
model.add(LSTM(100,input_dim=1,return_sequences=False))
#model.add(Dense(100,init='normal'))
model.add(Dense(8,init='normal'))
model.add(Activation("linear"))
model.compile(loss="mean_squared_error", optimizer="adam")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment