title: Keras: Multiple outputs, one output as input in the same network
body: <p>I have a neural network with two outputs, the second output has the first output as input.</p>
  <p>I guess during the training the first output's weights will be trained twice. Is that ok?<br />
  Is there some way to prevent output one will be trained from the output two?</p>
  <p>Here an example, output one is an action and the second output is a subaction that depend of input and the first action.</p>
  <pre><code>input_tensor = Input(shape=(2, ))
  
  # Create the first output
  output_1_action = Dense(10)(input_tensor)
  
  # Create the second output(use the first output as input here)
  x = Concatenate([input_tensor, output_1_action])
  output_2_subaction = Dense(10)(x)
  
  # Create a model with 2 outputs
  model = Model(input_tensor, [output_1_action, output_2_subaction])
  </code></pre>
  <p>For this simple example I can use two networks but my model uses lstm layers and I want to keep one state and one neural network.</p>