我有形状为(10000, 20, 15, 4)where 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 层?
慕尼黑5688855
相关分类