相关疑难解决方法(0)

了解Keras LSTM

我试图调和我对LSTM的理解,并在克里斯托弗·奥拉在克拉拉斯实施的这篇文章中指出.我正在关注Jason Brownlee为Keras教程撰写博客.我主要困惑的是,

  1. 将数据系列重塑为[samples, time steps, features]和,
  2. 有状态的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))
########################
# The IMPORTANT BIT
##########################
# create and fit the LSTM network
batch_size = 1
model = Sequential()
model.add(LSTM(4, …
Run Code Online (Sandbox Code Playgroud)

python deep-learning lstm keras

259
推荐指数
4
解决办法
4万
查看次数

标签 统计

deep-learning ×1

keras ×1

lstm ×1

python ×1