Seq2Seq model prediction
sreeram004 opened this issue · 2 comments
Trained a Seq2Seq model. But on predicting following error enccuntered.
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:
The model needs 2 inputs, but in the example only 1 is provided
loading Seq2Seq model with LSTM cell ...
information of the model:
{'input_shape': (48, 1), 'output_shape': (12, 1), 'cell': 'LSTM', 'cell_units': 32, 'class': 'Seq2Seq'}
Layer (type) Output Shape Param # Connected to
input_1 (InputLayer) (None, 48, 1) 0
input_2 (InputLayer) (None, 1, 1) 0
lstm_1 (LSTM) [(None, 32), (None, 4352 input_1[0][0]
lstm_2 (LSTM) [(None, 1, 32), (Non 4352 input_2[0][0]
lstm_1[0][1]
lstm_1[0][2]
dense_1[0][0]
lstm_2[0][1]
lstm_2[0][2]
dense_1[1][0]
lstm_2[1][1]
lstm_2[1][2]
dense_1[2][0]
lstm_2[2][1]
lstm_2[2][2]
dense_1[3][0]
lstm_2[3][1]
lstm_2[3][2]
dense_1[4][0]
lstm_2[4][1]
lstm_2[4][2]
dense_1[5][0]
lstm_2[5][1]
lstm_2[5][2]
dense_1[6][0]
lstm_2[6][1]
lstm_2[6][2]
dense_1[7][0]
lstm_2[7][1]
lstm_2[7][2]
dense_1[8][0]
lstm_2[8][1]
lstm_2[8][2]
dense_1[9][0]
lstm_2[9][1]
lstm_2[9][2]
dense_1[10][0]
lstm_2[10][1]
lstm_2[10][2]
dense_1 (Dense) (None, 1, 1) 33 lstm_2[0][0]
lstm_2[1][0]
lstm_2[2][0]
lstm_2[3][0]
lstm_2[4][0]
lstm_2[5][0]
lstm_2[6][0]
lstm_2[7][0]
lstm_2[8][0]
lstm_2[9][0]
lstm_2[10][0]
lstm_2[11][0]
lambda_1 (Lambda) (None, 12, 1) 0 dense_1[0][0]
dense_1[1][0]
dense_1[2][0]
dense_1[3][0]
dense_1[4][0]
dense_1[5][0]
dense_1[6][0]
dense_1[7][0]
dense_1[8][0]
dense_1[9][0]
dense_1[10][0]
dense_1[11][0]
Total params: 8,737
Trainable params: 8,737
Non-trainable params: 0
Problem is after saving and loading the model. If the model is not saved and predicted error is not thrown