问题遇到的现象和发生背景
是一个单步预测的网络,我的输入是20个数据,我现在想把预测得到的数据和后19个输入合在一起再输入模型进行预测,该怎么操作
问题相关代码,请勿粘贴截图
```python
# define input sequence
raw_seq = df_train
# choose a number of time steps
n_steps = 20
# split into samples
X, y = split_sequence(raw_seq, n_steps)
# reshape from [samples, timesteps] into [samples, timesteps, features]
n_features = 1
X = X.reshape((X.shape[0], X.shape[1], n_features))
# define model
model = Sequential()
model.add(LSTM(50, activation='relu', input_shape=(n_steps, n_features)))
model.add(Dense(1))
model.compile(optimizer='adam', loss='mse')
# fit model
model.fit(X, y, epochs=200, verbose=0)
# demonstrate prediction
x_input = array(df.values[40:60])
x_input = x_input.reshape((1, n_steps, n_features))
yhat = model.predict(x_input, verbose=0)
print(yhat)
###### 运行结果及报错内容
###### 我的解答思路和尝试过的方法
###### 我想要达到的结果