title: Merge 2 sequential models in Keras
body: <p>I a trying to merge 2 sequential models in keras. Here is the code:</p>
  
  <pre><code>model1 = Sequential(layers=[
      # input layers and convolutional layers
      Conv1D(128, kernel_size=12, strides=4, padding='valid', activation='relu', input_shape=input_shape),
      MaxPooling1D(pool_size=6),
      Conv1D(256, kernel_size=12, strides=4, padding='valid', activation='relu'),
      MaxPooling1D(pool_size=6),
      Dropout(.5),
  
  ])
  
  model2 = Sequential(layers=[
      # input layers and convolutional layers
      Conv1D(128, kernel_size=20, strides=5, padding='valid', activation='relu', input_shape=input_shape),
      MaxPooling1D(pool_size=5),
      Conv1D(256, kernel_size=20, strides=5, padding='valid', activation='relu'),
      MaxPooling1D(pool_size=5),
      Dropout(.5),
  
  ])
  
  model = merge([model1, model2], mode = 'sum')
  Flatten(),
  Dense(256, activation='relu'),
  Dropout(.5),
  Dense(128, activation='relu'),
  Dropout(.35),
  # output layer
  Dense(5, activation='softmax')
  return model
  </code></pre>
  
  <p>Here is the error log:</p>
  
  <blockquote>
    <p>File
    "/nics/d/home/dsawant/anaconda3/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py",
    line 392, in is_keras_tensor
        raise ValueError('Unexpectedly found an instance of type <code>' + str(type(x)) + '</code>. ' ValueError: Unexpectedly found an instance of
    type <code>&lt;class 'keras.models.Sequential'&gt;</code>. Expected a symbolic tensor
    instance.</p>
  </blockquote>
  
  <p>Some more log:</p>
  
  <blockquote>
    <p>ValueError: Layer merge_1 was called with an input that isn't a
    symbolic tensor. Received type: class 'keras.models.Sequential'.
    Full input: [keras.models.Sequential object at 0x2b32d518a780,
    keras.models.Sequential object at 0x2b32d521ee80]. All inputs to the
    layer should be tensors.</p>
  </blockquote>
  
  <p>How can I merge these 2 Sequential models that use different window sizes and apply functions like 'max', 'sum' etc to them?</p>