我训练了一个模特:
trainX = trainX.reshape(1, 43164, 17)
trainY = trainY.reshape(43164, 1)
model = Sequential()
model.add(LSTM(2, input_shape=(43164, 17)))
model.add(Dense(1))
model.compile(loss='mean_squared_error', optimizer='adam')
model.fit(trainX, trainY[0], epochs=100)
testX.shape # (8633, 17)
testX = testX.reshape(1, 8633, 17)
当我对这些数据进行预测时,我得到了一个错误:
Error when checking input: expected lstm_26_input to have shape (43164, 17)
but got array with shape (8633, 17)
为了得到好的结果我能做些什么
在深度学习网络的Sequential modesls中,你既可以用有限的短窗口传递数据,也可以用改变窗口的步幅传递数据
用一维向量传递所有序列
相关问题 更多 >
编程相关推荐