Keras - Connecting Functional API models together
<p>I'm trying to connect 2 functional API models together. here's the summary of the 2 models:</p>

<p>The First "Input" Model (It works as a single model just fine):</p>

<p><img src="https://cloud.githubusercontent.com/assets/22426131/19739243/0dbe2ef6-9bc7-11e6-8a12-780210ecfee7.png" alt="model1"></p>

<p>The Second Model that is supposed to be connected to the first model:</p>

<p><img src="https://cloud.githubusercontent.com/assets/22426131/19740118/68bddf10-9bca-11e6-9cba-c85836067342.png" alt="model2"></p>

<p>I'm trying to connect them together like this:</p>

<pre><code>model = Model(input=generator.input, output=[discriminator.output[0], discriminator.output[1]])
</code></pre>

<p>But I get this error:</p>

<blockquote>
  <p>Graph disconnected: cannot obtain value for tensor discriminator_input
  at layer "discriminator_input". The following previous layers were
  accessed without issue: []</p>
</blockquote>

<p>I tried to make a model out of them like this:</p>

<pre><code>Model(input=[generator.input, discriminator.input], output=[discriminator.output[0], discriminator.output[1]])
</code></pre>

<p>But this code just resulted in the second Model (and not the 2 of them together), or at least this is what I think after getting a summary of the model and plotting it's structure.</p>

<p>can we do this in Keras (connecting functional API models) or is there another way?
Thanks</p>