title: Training a model using a pre-trained model
body: <p>I have a pre-trained model in Keras. I would like to train another model where the output of the model is input for the already trained model and the output of the already trained model is being used in the loss function of the untrained model. Something like </p>
  
  <pre><code>in_a + mod_b(some kind of feedback from B here) --&gt; Model A --&gt; out_a --&gt; Model B --&gt; out_b
  
  error  = (in_a - out_b)**2
  </code></pre>
  
  <p>and then use this error to train Model A.
  <code>in_a</code> can be treated as a constant in this system and there is a feedback loop as well</p>
  
  <p>Any ideas how to do this in keras or tensorflow </p>