【发布时间】:2019-03-26 22:18:01
【问题描述】:
我的数据形状为(10000, 20, 15, 4),其中num samples = 10000、num series in time = 20、height = 15、weight = 4。所以我有表15x4,它随着时间的推移而分布。这是我想用这些数据训练它的模型:
...
model.add((LSTM(nums-1,return_sequences=True,input_shape=(20,15,4), activation='relu')))
model.add((LSTM(nums-1,return_sequences=False,input_shape=(20,15,4), activation='tanh')))
model.add(Dense(15,activation='relu'))
...
但是,我收到以下错误:
ValueError: Input 0 is incompatible with layer lstm_1: expected ndim=3,
found ndim=4
如何定义具有 4D 输入形状的 LSTM 层?
【问题讨论】:
标签: python tensorflow machine-learning keras lstm