Keras多个输入-预期会看到2个数组,但获得了以下1个数组的列表:

以下是创建模型的代码。模型具有2个输入层,1个嵌入,LSTM,注意和密集层。尝试执行具有多个输入的model.fit时出现错误(附加图像)。

不知道为什么吗?请解释。

MAX_SEQUENCE_LENGTH = 20
# First input layer 
sequence_ip = Input(shape=(MAX_SEQUENCE_LENGTH,), dtype='int32')

# Second input layer
time_Decay_ip = Input(shape=(MAX_SEQUENCE_LENGTH,), dtype='float32')

# Adding embedding layer
embedding_layer = Embedding(vocab_length, output_dim = 32, input_length=seq_length, trainable=True) 
embedded_sequences = embedding_layer(sequence_ip)

l_gru = LSTM(100, return_sequences=True)(embedded_sequences)
l_att = attention()([l_gru, time_Decay_ip])

preds = Dense(1, activation='softmax', trainable = True)(l_att)
model = Model([sequence_ip, time_Decay_ip], preds)
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['acc'])

model.summary()
model.fit(x = [np.array(X_train), np.array(time_decay_tr)], y = np.array(Y_train), validation_data=(X_test, Y_test), nb_epoch=10, batch_size=9)

enter image description here"Error Message"

I checked shape and length of input list