title: Combine to Keras functional models
body: <p>I am trying to mimic <a href="https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html" rel="noreferrer">this keras blog</a> about fine tuning image classifiers. I would like to use the Inceptionv3 found <a href="https://github.com/fchollet/deep-learning-models" rel="noreferrer">on a fchollet repo</a>. </p>
  
  <p>Inception is a <code>Model</code> (functional API), so I can't just do <code>model.add(top_model)</code> which is reserved for <code>Sequential</code>.</p>
  
  <p>How can I add combine two functional <code>Model</code>s? Let's say I have</p>
  
  <pre><code>inputs = Input(shape=input_shape)
  x = Flatten()(inputs)
  predictions = Dense(4, name='final1')(x)
  
  model1 = Model(input=inputs, output=predictions)
  </code></pre>
  
  <p>for the first model and </p>
  
  <pre><code>inputs_2 = Input(shape=(4,))
  y = Dense(5)(l_inputs)
  y = Dense(2, name='final2')(y)
  predictions_2 = Dense(29)(y)
  model2 = Model(input=inputs2, output=predictions2)
  </code></pre>
  
  <p>for the second. I now want an end-to-end that goes from <code>inputs</code> to <code>predicions_2</code> and links <code>predictions</code> to <code>inputs_2</code>.</p>
  
  <p>I tried using <code>model1.get_layer('final1').output</code> but I had a mismatch with types and I couldn't make it work.</p>