1
0
mirror of https://github.com/newnius/YAO-optimizer.git synced 2025-12-13 08:26:43 +00:00
This commit is contained in:
2020-05-02 09:35:42 +08:00
parent 9a9cbd60ae
commit 50e51a4575
2 changed files with 11 additions and 13 deletions

View File

@@ -76,7 +76,7 @@ def fit_lstm(train, batch_size, nb_epoch, neurons):
# make a one-step forecast
def forecast_lstm(model, batch_size, X):
X = X.reshape(1, 1, len(X))
X = X.reshape(X.shape[0], X.shape[1], len(X))
yhat = model.predict(X, batch_size=batch_size)
return yhat[0, 0]