title: Problem with multioutput bidirectional lstm
body: <p>I'm a newbie for programming the multi-output classification for text classification but when I tried to compile my model there was some error:</p>
  
  <blockquote>
    <p>Error when checking model target: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 4 array(s), but instead got the following list of 1 arrays:</p>
  </blockquote>
  
  <p>How should I solve this problem and is there a mistake in my model?</p>
  
  <p>I tried to fixing the labeling and data preprocessing but the error still happens. </p>
  
  <p>I have 4 labels <code>(LA,LB,LC,LD)</code>.</p>
  
  <p>Shape of <code>x_train</code> tensor: <code>(201, 525)</code></p>
  
  <p>Label Example : 
  <code>[array([[1.],[4.],[4.],[4.],[4.],[2.]]), array([[2.],[3.]......)....]</code></p>
  
  <pre class="lang-py prettyprint-override"><code>def LSTMmodel(hiddenlayer = 64, drop = 0.5):
      #Input
      sequence_input = Input(shape=(MAX_SEQUENCE_LENGTH,), dtype='int32')
  
      ########################################################################
      embedded_sequences = embedding_layer(sequence_input)
      print (embedded_sequences)
      dropout = Dropout(drop)(embedded_sequences)
  
      #########################################################################
  
  
      y1 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(dropout)
      y1 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(y1)
      y1 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(y1)
      y1 = Bidirectional(LSTM(hiddenlayer))(y1)
      y1 = Dropout(drop)(y1)
  
      y2 =  Bidirectional(LSTM(hiddenlayer, return_sequences=True))(dropout)
      y2 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(y2)
      y2 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(y2)
      y2 = Bidirectional(LSTM(hiddenlayer))(y2)
      y2 = Dropout(drop)(y2)
  
      y3 =  Bidirectional(LSTM(hiddenlayer, return_sequences=True))(dropout)
      y3 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(y3)
      y3 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(y3)
      y3 = Bidirectional(LSTM(hiddenlayer))(y3)
      y3 = Dropout(drop)(y3)
  
      y4 =  Bidirectional(LSTM(hiddenlayer, return_sequences=True))(dropout)
      y4 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(y4)
      y4 = Bidirectional(LSTM(hiddenlayer, return_sequences=True))(y4)
      y4 = Bidirectional(LSTM(hiddenlayer))(y4)
      y4 = Dropout(drop)(y4)
  
      y1 = Dense(LA_nodes, activation='softmax',name= 'LA')(y1)
      y2 = Dense(LB_nodes, activation='softmax',name= 'LB')(y2)
      y3 = Dense(LC_nodes, activation='softmax',name= 'LC')(y3)
      y4 = Dense(LD_nodes, activation='softmax',name= 'LD')(y4)
  
  
  
  
      model = Model(sequence_input,outputs =[y1,y2,y3,y4])
      model.summary()
  
  
      model.compile(loss='categorical_crossentropy',
                    optimizer=SGD(lr=0.01,momentum=0.9),
                    metrics=['accuracy'])
  
  
      checkloss = create_checkpoint('LSTM') 
      checkacc = create_checkpoint2('LSTM')
  
  
      print('Training...')
      history = model.fit(x_train, y_trainn_new,
                batch_size=batch_size,
                epochs=max_epochs,
                validation_data=x_test,
                shuffle=True,
                #callbacks=[checkloss, checkacc, early_stopping])
      return model, history
  </code></pre>
  
  <p>I expect there is no  value error but it still on</p>