title: Concatenate Layer Errors
body: <p>I am using keras 2.02 and tensorflow 1.3 to build a convolution net with multiple sizes of filters. The code is shown below.</p>
  
  <pre><code>flts=100
  kernel_sizes=[2,3,4]
  submodels = []
  for kw in kernel_sizes:    # kernel sizes
      submodel = Sequential()
      submodel.add(embedding_layer)
      submodel.add(Dropout(0.2))
      submodel.add(Conv1D(filters=flts,
                          kernel_size=kw,
                          padding='same',
                          activation='relu'))
      submodel.add(MaxPooling1D(pool_size=kw))
      submodels.append(submodel)
  
  big_model = Sequential()
  #concat = Concatenate(axis=1)     #line B
  #big_model.add(concat(submodels)) #line C
  big_model.add(Merge(submodels, mode="concat", concat_axis=1))  #line A
  big_model.add(LSTM(units=100, return_sequences=True))
  big_model.add(GlobalMaxPooling1D())
  #big_model.add(Dropout(0.2))
  big_model.add(Dense(2, activation='softmax'))
  big_model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
  </code></pre>
  
  <p>When using the deprecated code as on line A, it works ok. But when this is replaced by lines B,C, an error is generated as below:</p>
  
  <pre><code>--&gt; 141     big_model.add(concat(submodels))
          big_model.add = &lt;bound method Sequential.add of &lt;keras.models.Sequential object&gt;&gt;
          concat = &lt;keras.layers.merge.Concatenate object&gt;
          submodels = [&lt;keras.models.Sequential object&gt;, &lt;keras.models.Sequential object&gt;, &lt;keras.models.Sequential object&gt;]
      142     big_model.add(LSTM(units=100, return_sequences=True))
      143     big_model.add(GlobalMaxPooling1D())
      144     #big_model.add(Dropout(0.2))
      145     big_model.add(Dense(2, activation='softmax'))
  
  
  ........
  
  /home/zqz/Programs/anaconda3/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py in int_shape(x=&lt;keras.models.Sequential object&gt;)
      404         (2, 2)
      405     ```
      406     """
      407     if hasattr(x, '_keras_shape'):
      408         return x._keras_shape
  --&gt; 409     shape = x.get_shape()
          shape = undefined
          x.get_shape = undefined
      410     try:
      411         return tuple([i.__int__() for i in shape])
      412     except ValueError:
      413         return None
  
  AttributeError: 'Sequential' object has no attribute 'get_shape'
  ___________________________________________________________________
  </code></pre>
  
  <p>I don't know what I should do to fix this?</p>
  
  <p>Thanks in advance</p>