3
了解Keras LSTM
我试图调和对LSTM的理解,并在克里斯托弗·奥拉(Christopher Olah)在Keras中实现的这篇文章中指出了这一点。我正在关注Jason Brownlee为Keras教程撰写的博客。我主要感到困惑的是 将数据系列重塑为 [samples, time steps, features]和, 有状态的LSTM 让我们参考下面粘贴的代码专注于以上两个问题: # reshape into X=t and Y=t+1 look_back = 3 trainX, trainY = create_dataset(train, look_back) testX, testY = create_dataset(test, look_back) # reshape input to be [samples, time steps, features] trainX = numpy.reshape(trainX, (trainX.shape[0], look_back, 1)) testX = numpy.reshape(testX, (testX.shape[0], look_back, 1)) …
311
python
deep-learning
keras
lstm