title: Using keras api for a multiple output model with the same target value
body: <p>In the case of multi-input or multi-output models according to <a href="https://keras.io/models/model/" rel="nofollow noreferrer">https://keras.io/models/model/</a>, one can use</p>
  
  <pre><code>model = Model(inputs=a1, outputs=[b1, b2])
  </code></pre>
  
  <p>What if b1 and b2 are actually identical target values? I.e. After few initial layers, model has two independent "branches" and each should give the same value. Below is very simplified example</p>
  
  <pre><code>a  = Input(shape=(32,))
  b1 = Dense(32)(a)
  b2 = Dense(32)(a)
  
  model = Model(inputs=a, outputs=[b1,b2])
  </code></pre>
  
  <p>Is there a nicer/better way of doing fit than duplicating target values?</p>
  
  <pre><code>model.fit(x_train, [y_train, y_train])
  </code></pre>
  
  <p>Additionaly, if true labels (y_train) are needed during fit (only), one can use them like this</p>
  
  <pre><code>model.fit([x_train,y_train], [y_train, y_train])
  </code></pre>
  
  <p>Is there any better solution? Also, what to do with the prediction?    </p>
  
  <pre><code>model.predict([x_test, y_test_fake_labels])
  </code></pre>