1 2 3 4 5 6 7 |
# LSTMモデルの作成と学習 model = Sequential() model.add(LSTM(64, return_sequences=True,input_shape=(look_back, 1))) model.add(LSTM(32)) model.add(Dense(1)) model.compile(loss='mean_squared_error', optimizer='adam') model.fit(trainX, trainY, epochs=10, batch_size=1, verbose=2) |
コメントを残す