title: Keras.layers.concatenate generates an error'
body: <p>I am trying to train a CNN with two input branches. And these two branches (b1, b2) are to be merged into a densely connected layer of 256 neurons with dropout rate of 0.25. This is what I have so far:</p>
  
  <pre><code>batch_size, epochs = 32, 3
  ksize = 2
  l2_lambda = 0.0001
  
  
  ### My first model(b1)
  b1 = Sequential()
  b1.add(Conv1D(128*2, kernel_size=ksize,
               activation='relu',
               input_shape=( xtest.shape[1], xtest.shape[2]),
               kernel_regularizer=keras.regularizers.l2(l2_lambda)))
  b1.add(Conv1D(128*2, kernel_size=ksize, activation='relu',kernel_regularizer=keras.regularizers.l2(l2_lambda)))
  b1.add(MaxPooling1D(pool_size=ksize))
  b1.add(Dropout(0.2))
  
  b1.add(Conv1D(128*2, kernel_size=ksize, activation='relu',kernel_regularizer=keras.regularizers.l2(l2_lambda)))
  b1.add(MaxPooling1D(pool_size=ksize))
  b1.add(Dropout(0.2))
  
  b1.add(Flatten())
  
  ###My second model (b2)
  
  b2 = Sequential()
  b2.add(Dense(64, input_shape = (5000,), activation='relu',kernel_regularizer=keras.regularizers.l2(l2_lambda)))
  b2.add(Dropout(0.1))
  
  
  ##Merging the two models
  model = Sequential()
  model.add(concatenate([b1, b2],axis = -1))
  model.add(Dense(256, activation='relu', kernel_initializer='normal',kernel_regularizer=keras.regularizers.l2(l2_lambda)))
  model.add(Dropout(0.25))
  model.add(Dense(num_classes, activation='softmax'))
  </code></pre>
  
  <p><strong>But when I concatenate it gives me the following error:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/ML8q7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ML8q7.png" alt="enter image description here"></a></p>
  
  <p>I first tried using the following command:</p>
  
  <pre><code>  model.add(Merge([b1, b2], mode = 'concat'))
  </code></pre>
  
  <p>But I got the error that <strong>'ImportError: cannot import name 'Merge''</strong>. I am using keras 2.2.2 and python 3.6.</p>