title: How to "Merge" Sequential models in Keras 2.0?
body: <p>I am trying to merge two Sequential models In Keras 2.0, using the following line:</p>
  
  <pre><code>merged_model.add(Merge([model1, model2], mode='concat'))
  </code></pre>
  
  <p>This still works fine, but gives a warning: </p>
  
  <pre><code>"The `Merge` layer is deprecated and will be removed after 08/2017. Use
  instead layers from `keras.layers.merge`, e.g. `add`, `concatenate`, etc." 
  </code></pre>
  
  <p>However, studying the Keras documentation and trying add, Add(), has not resulted in something that works. I have read several posts from people with the same problem, but found no solution that works in my case below. Any suggestions?</p>
  
  <pre><code>model = Sequential()
  model1 = Sequential()
  model1.add(Dense(300, input_dim=40, activation='relu', name='layer_1'))
  model2 = Sequential()
  model2.add(Dense(300, input_dim=40, activation='relu', name='layer_2'))
  merged_model = Sequential()
  
  merged_model.add(Merge([model1, model2], mode='concat'))
  
  merged_model.add(Dense(1, activation='softmax', name='output_layer'))
  merged_model.compile(loss='binary_crossentropy', optimizer='adam', 
  metrics=['accuracy'])
  
  checkpoint = ModelCheckpoint('weights.h5', monitor='val_acc',
  save_best_only=True, verbose=2)
  early_stopping = EarlyStopping(monitor="val_loss", patience=5)
  
  merged_model.fit([x1, x2], y=y, batch_size=384, epochs=200,
               verbose=1, validation_split=0.1, shuffle=True, 
  callbacks=[early_stopping, checkpoint])
  </code></pre>
  
  <p>EDIT: When I tried (as suggested below by Kent Sommer):</p>
  
  <pre><code>from keras.layers.merge import concatenate
  merged_model.add(concatenate([model1, model2]))
  </code></pre>
  
  <p>This was the error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/anaconda/lib/python3.6/site- packages/keras/engine/topology.py", line 425, 
  in assert_input_compatibility
      K.is_keras_tensor(x)
    File "/anaconda/lib/python3.6/site-
  packages/keras/backend/tensorflow_backend.py", line 403, in     is_keras_tensor
      raise ValueError('Unexpectedly found an instance of type `' +
   str(type(x)) + '`. '
  ValueError: Unexpectedly found an instance of type 
  `&lt;class'keras.models.Sequential'&gt;`. Expected a symbolic tensor instance.
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "quoradeeptest_simple1.py", line 78, in &lt;module&gt;
      merged_model.add(concatenate([model1, model2]))
    File "/anaconda/lib/python3.6/site-packages/keras/layers/merge.py",
   line 600, in concatenate return Concatenate(axis=axis, **kwargs)(inputs)
    File "/anaconda/lib/python3.6/site-   packages/keras/engine/topology.py", 
  line 558, in __call__self.assert_input_compatibility(inputs)
    File "/anaconda/lib/python3.6/site-packages/keras/engine/topology.py", line 431, 
   in assert_input_compatibility str(inputs) + '.All inputs to the layer '
  ValueError: Layer concatenate_1 was called with an input that isn't a
  symbolic tensor. Received type: &lt;class 'keras.models.Sequential'&gt;. 
  Full input: [&lt;keras.models.Sequential object at 0x140fa7ba8&gt;,
  &lt;keras.models.Sequential object at 0x140fabdd8&gt;]. All inputs to the
  layer should be tensors.
  </code></pre>