我正在为LLP问题开发LSTM程序。 我的数据和标签的形状为=(10,20,1)
我的模型代码如下:
model.add(Embedding(18,17,input_length=20,weights=[embedding_weights])) ( Shape of Embedding (18,17))
# encoder layer
model.add(LSTM(100, activation='relu', input_shape=(20, 1)))
# repeat vector
model.add(RepeatVector(20))
# decoder layer
model.add(LSTM(100, activation='relu', return_sequences=True))
model.add(TimeDistributed(Dense(1)))
model.compile(optimizer='adam', loss='mse')
我遇到以下错误
“ input_length”为20,但接收到的输入具有形状(无,20、1)