title: KeyError when trying to save a concatenated model
body: <p>You can check <a href="https://stackoverflow.com/questions/47653253/concatenating-or-cascading-multiple-pretrained-keras-models/47656972#47656972">this</a> question for problem description. I create 7 <code>models</code> by a for loop then <code>train</code> them (didn't mention training process in the code): </p>
  
  <pre><code>for i in range(1, 8):
      j=str(i)
      img_input = Input(shape=(img_width,img_height,1),name='input')
      x = Conv2D(32, (3,3), activation='relu', padding='same', name='conv1-'+j)(img_input)
      x = MaxPooling2D((2, 2), strides=(2, 2), name='pool1-'+j)(x)
      x = Conv2D(64, (3,3), activation='relu', padding='same', name='conv2-'+j)(x)
      x = MaxPooling2D((2, 2), strides=(2, 2), name='pool2-'+j)(x)
      x = Conv2D(128, (3,3), activation='relu', padding='same', name='conv3-'+j)(x)
      x = MaxPooling2D((2, 2), strides=(2, 2), name='pool3-'+j)(x)
      x = Flatten()(x)
      x = Dense(512, name='dense1-'+j)(x)
      x = Dense(512, name='dense2-'+j)(x)
      predictions = Dense(6, activation='softmax', name='predictions-'+j)(x)
     model = Model(inputs=img_input, outputs=predictions)
     model.compile(optimizer='Adam', loss='binary_crossentropy', 
                metrics=['accuracy'])
  </code></pre>
  
  <p>Popping the last <code>softmax layer</code> of each model and saving the rest of the models into a list named as <code>models[]</code>:</p>
  
  <pre><code>inputTensor = Input(shape=(img_width,img_height,1),name='inputs') 
  for i in range (1,8):                                   #save models into a models[] list
      j = str(i)
      models[i] = load_model(path+j+"/weights.best.hdf5") #load models from disk
      models[i].layers.pop()                              #Pop last layer
      models[i].outputs= [models[i].layers[-1].output]    #Fix layer pop bug        
      models[i].layers[-1].outbound_nodes = []            #Fix layer pop bug
      for layer in models[i].layers:                      #Make intermediate
          layer.trainable=False                           #layers untrainable
  </code></pre>
  
  <p>Implementing a concat to all of these models and then trying to save the finalModel:</p>
  
  <pre><code>outputTensors= [models[m](inputTensor) for m in models]
  output = Concatenate()(outputTensors)
  predictions = Dense(6, activation='softmax', name='predictionss')(output)
  model=Model(inputTensor, predictions)
  model.compile(optimizer='Adam', loss='binary_crossentropy', metrics=['accuracy'])
  model.save('model')
  </code></pre>
  
  <p>But when saving occurs it throws an error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;ipython-input-43-6221fb2664c1&gt;", line 10, in &lt;module&gt;
      model.save('model')
  
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\topology.py", line 2553, in save
      save_model(self, filepath, overwrite, include_optimizer)
  
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\keras\models.py", line 107, in save_model
      'config': model.get_config()
  
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\topology.py", line 2326, in get_config
      layer_config = layer.get_config()
  
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\topology.py", line 2390, in get_config
      new_node_index = node_conversion_map[node_key]
  
  KeyError: 'predictions-1_ib-0
  </code></pre>
  
  <p>And I can't overcome this error.
  Appreciate your helps.</p>