title: keras training 2 models simultaneously
body: <p>I have 2 models: model1 and model2. </p>
  
  <p>I need to take model 1 output and manipulate myData manually and set it (manipulated myData) as input of model2.</p>
  
  <p>model2's output is classification of the responses of myData (to model1 output manipulation), relative to predefined classification (i.e. supervised).</p>
  
  <ol>
  <li>I need to improve model1 output and improve model2 classification simultaneously. However in testing I will work with each model separately. </li>
  <li>To my opinion I need to use model 2 cost function as model 1 cost function - how can it be done? </li>
  <li>Any other idea how can it be done? </li>
  </ol>
  
  <p>I emphasize: Concatenate does NOT solve the problem. </p>
  
  <p>Please refer to the <a href="https://i.stack.imgur.com/hwnBv.png" rel="nofollow noreferrer">attached diagram</a></p>