1
0
mirror of https://github.com/newnius/YAO-optimizer.git synced 2025-12-15 09:06:43 +00:00
This commit is contained in:
2020-05-02 12:40:24 +08:00
parent 3ceffd4828
commit 9ff2933e74
2 changed files with 2 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ def invert_scale(scaler, X, yhat):
def fit_lstm(train, batch_size2, nb_epoch, neurons):
X, y = train[:, 0:-1], train[:, -1]
X = X.reshape(X.shape[0], 1, X.shape[1])
print(X, y)
model = Sequential()
model.add(LSTM(neurons, batch_input_shape=(batch_size2, X.shape[1], X.shape[2]), stateful=True))
model.add(Dense(1))