【发布时间】:2021-04-28 04:48:06
【问题描述】:
我正在尝试通过 LSTM 处理 5 层,但遇到了错误。 下面是代码。
yhdistelma=layers.concatenate([input1,input2,
input3, input4,
input5, input6,
input7, input8, input9])
first_output = layers.Dense(30,name='output_1')(yhdistelma)
second_output = layers.Dense(30,name='output_2')(yhdistelma)
third_output = layers.Dense(30,name='output_3')(yhdistelma)
fourth_output = layers.Dense(30,name='output_4')(yhdistelma)
fifth_output = layers.Dense(30,name='output_5')(yhdistelma)
hhs= layers.concatenate([first_output, second_output,
third_output, fourth_output,
fifth_output])
xxs=layers.LSTM(5)(hhs)
model.compile 给出的错误是
Input 0 of layer lstm_2 is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (None, 150)
【问题讨论】:
标签: tensorflow keras deep-learning lstm recurrent-neural-network