model.fit(
{'main_input': X_text_train, 'aux_input': X_number_train},
{'main_output': y_train, 'aux_output': y_train},
validation_data=[
{'main_input': X_text_test, 'aux_input': X_number_test},
{'main_output': y_test, 'aux_output': y_test}
],
epochs=20,
batch_size=2048
)
predicted_classes = model.predict(np.array(X_text_train))
#predicted_classes = model.predict(np.array(X_text_train), np.array(X_number_train))
#predicted_classes = model.predict(X_text_train)
出现以下错误:
ValueError: Error when checking model input:
the list of Numpy arrays that you are passing to your model is not the
size the model expected. Expected to see 2 array(s), but instead got the
following list of 1 arrays:
[array([[ 0, 0, 0, ..., 7614, 450, 963],
[ 0, 0, 0, ..., 28, 3, 1259],
[ 0, 0, 0, ..., 332, 136, 140],
...,
[ 0, 0, 0, ..., 1174, ...