title: Train Multi-Input Keras NN with batch of training data
body: <p>I would like to use Keras to train a multi-input NN with a batch of training data, but I'm not able to pass a set of input and output samples to execute a <em>fit</em> or a <em>train_on_batch</em> on the model.</p>
  
  <p>My NN is defined as following:</p>
  
  <pre><code>    i1 = keras.layers.Input(shape=(2,))
      i2 = keras.layers.Input(shape=(2,))
      i3 = keras.layers.Input(shape=(2,))
      i_layer = keras.layers.Dense(2, activation='sigmoid')
      embedded_i1 = i_layer(i1)
      embedded_i2 = i_layer(i2)
      embedded_i3 = i_layer(i3)
  
      middle_concatenation = keras.layers.concatenate([embedded_i1, embedded_i2, embedded_i3], axis=1)
  
      out = keras.layers.Dense(1, activation='sigmoid')(middle_concatenation)
  
      model = keras.models.Model(inputs=[i1, i2, i3], outputs=out)
      model.compile(optimizer='rmsprop', loss='binary_crossentropy', metrics=['accuracy'])
  </code></pre>
  
  <p>For example, an instance of the input (successfully used for predict the output) is the following:</p>
  
  <p><code>[array([[0.1, 0.2]]), array([[0.3, 0.5]]), array([[0.1, 0.3]])]</code></p>
  
  <p>But when I try to train my model with:</p>
  
  <pre><code>    inputs = [[np.array([[0.1, 0.2]]), np.array([[0.3, 0.5]]), np.array([[0.1, 0.3]])],
                       [np.array([[0.2, 0.1]]), np.array([[0.5, 0.3]]), np.array([[0.3, 0.1]])]
                           ]
      outputs = np.ones(len(inputs))
      model.fit(inputs, outputs)
  </code></pre>
  
  <p>I get this error:<br></p>
  
  <pre><code>ValueError: Error when checking model input: you are passing a list as input to your model, but the model expects a list of 3 Numpy arrays instead. The list you passed was: [[array([[ 0.1,  0.2]]), array([[ 0.3,  0.5]]), array([[ 0.1,  0.3]])], [array([[ 0.2,  0.1]]), array([[ 0.5,  0.3]]), array([[ 0.3,  0.1]])]]
  </code></pre>
  
  <p>What am I doing wrong?<br>
  How can I train a multi-input NN with a batch of input/output samples?</p>
  
  <p>Thank you!</p>