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 10:19:41 +08:00
parent 4bd70489c5
commit ac607fc170
2 changed files with 13 additions and 15 deletions

View File

@@ -60,6 +60,9 @@ def invert_scale(scaler, X, yhat):
# fit an LSTM network to training data
def fit_lstm(train, batch_size, nb_epoch, neurons):
t = train.shape[0] % batch_size
train = train[train.shape[0] - t * batch_size:]
X, y = train[:, 0:-1], train[:, -1]
X = X.reshape(X.shape[0], 1, X.shape[1])
model = Sequential()