title: Tensorflow can't handle multiple input
body: <p>Have one model to proccess image and one model to proccess numerical values.
  Merged both models getting this:
  <a href="https://i.stack.imgur.com/JC9Eh.png" rel="nofollow noreferrer">Merged model</a></p>
  
  <p>For the image input I created a image data generator from a dataframe + pictures:</p>
  
  <pre><code>print('Importing keras...')
  from keras_preprocessing.image import ImageDataGenerator
  
  print('Defining datagens and dataflows...')
  
  train_datagen = ImageDataGenerator(rescale = 1./255.,
                                     rotation_range = 25,
                                     width_shift_range = [0.1, 0.2, 0.3],
                                     height_shift_range = [0.1, 0.2, 0.3],
                                     shear_range = 0.2,
                                     zoom_range = 0.2,
                                     channel_shift_range = 0.3,
                                     horizontal_flip = True,
                                     vertical_flip = True)
  
  test_datagen = ImageDataGenerator( rescale = 1.0/255. )
  
  # Flow training images batch size should consider RAM
  train_generator = train_datagen.flow_from_dataframe(dataframe=df_train_img,
                                                      directory='/kaggle/input/siim-isic-melanoma-classification/jpeg/train',
                                                      x_col = 'image_name',
                                                      y_col = 'benign_malignant',
                                                      batch_size = 20,
                                                      class_mode = 'binary', 
                                                      target_size = (256, 256))     
  
  # Flow validation images batch size should consider RAM
  test_generator = test_datagen.flow_from_dataframe(dataframe=df_test_img,
                                                      directory='/kaggle/input/siim-isic-melanoma-classification/jpeg/train',
                                                      x_col = 'image_name',
                                                      y_col = 'benign_malignant',
                                                      batch_size = 20,
                                                      class_mode = 'binary', 
                                                      target_size = (256, 256))
  
  print('Done')
  </code></pre>
  
  <p>For the numerical part I created a dataframe with features:</p>
  
  <p><a href="https://i.stack.imgur.com/hh1la.png" rel="nofollow noreferrer">Dataframe</a></p>
  
  <p>Compiled the model:</p>
  
  <pre><code>img_model = keras.Sequential([
    layers.Flatten(input_shape=(256, 256, 3)),
    layers.Dense(512, activation='relu'),
    layers.Dense(12, activation='softmax')
  ])
  
  # Flatten the output layer to 1 dimension
  reg_model = keras.Sequential([
    layers.Flatten(input_shape=(12, )),
    layers.Dense(512, activation='relu'),
    layers.Dense(12, activation='softmax')
  ])
  
  z = layers.concatenate([img_model.output,reg_model.output])
  # Flatten the output layer to 1 dimension
  z = layers.Flatten()(z)
  # Add a fully connected layer with 1,024 hidden units and ReLU activation
  z = layers.Dense(1024, activation='relu')(z)
  # Add a dropout rate of 0.2
  z = layers.Dropout(0.2)(z)                  
  # Add a final sigmoid layer for classification
  z = layers.Dense(2, activation='softmax')(z)
  
  
  model = Model( inputs=[reg_model.input, img_model.input], outputs=z) 
  
  model.compile(optimizer = RMSprop(lr=0.0001), 
                loss = 'binary_crossentropy', 
                metrics = ['accuracy'])
  </code></pre>
  
  <p>And when I tried to fit:</p>
  
  <pre><code>history = model.fit(
              {'flatten_15_input':train_generator,'flatten_16_input':X_train},
              {'dense_31' : y_train},
              epochs = 2,
              verbose = 2)
  </code></pre>
  
  <p>Got the following error:</p>
  
  <pre><code>ValueError: Failed to find data adapter that can handle input: (&lt;class 'dict'&gt; containing {"&lt;class 'str'&gt;"} keys and {"&lt;class 'keras_preprocessing.image.dataframe_iterator.DataFrameIterator'&gt;", "&lt;class 'numpy.ndarray'&gt;"} values), (&lt;class 'dict'&gt; containing {"&lt;class 'str'&gt;"} keys and {"&lt;class 'numpy.ndarray'&gt;"} values)
  </code></pre>
  
  <p>Tried to pass as input a dataframe, an array and a dataset.
  Each model works fine before the merge. What am I doing wrong?</p>