From 28d2edf065be33226ea4d9ade4f99e05afce6932 Mon Sep 17 00:00:00 2001 From: Newnius Date: Sat, 2 May 2020 15:00:10 +0800 Subject: [PATCH] update --- .idea/workspace.xml | 45 +++++++++++++++++++++------------------------ train.py | 2 +- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b595be1..6890aed 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,9 +1,7 @@ - - - + - + - - + + @@ -101,11 +99,11 @@ - + - - + + @@ -196,11 +194,11 @@ @@ -243,7 +241,7 @@ - + @@ -284,16 +282,15 @@ - - @@ -424,22 +421,22 @@ - + - - + + - + - + - - + + - + diff --git a/train.py b/train.py index 8aa6996..2656582 100644 --- a/train.py +++ b/train.py @@ -67,7 +67,7 @@ def fit_lstm(train, batch_size2, nb_epoch, neurons): model = Sequential() model.add(LSTM(neurons, batch_input_shape=(batch_size2, X.shape[1], X.shape[2]), stateful=True)) model.add(Dense(1)) - model.compile(loss='mean_squared_error', optimizer='adam') + model.compile(loss='mean_squared_error', optimizer=Adam(lr=0.01)) for i in range(nb_epoch): print("Epoch {}/{}".format(i, nb_epoch)) model.fit(X, y, epochs=1, batch_size=batch_size2, verbose=0, shuffle=False)