title: Input tensors to a Model must come from `tf.layers.Input` when I concatenate two models with Keras API on Tensorflow
body: <p>I'm creating a wide and deep model using Keras functional API on tensorflow.  </p>
  
  <p>When I try to merge the two models, the below error occurred. </p>
  
  <blockquote>
    <p>--------------------------------------------------------------------------- ValueError                                Traceback (most recent call
    last)  in ()
          1 merged_out = tf.keras.layers.concatenate([wide_model.output, deep_model.output])
          2 merged_out = tf.keras.layers.Dense(1)(merged_out)
    ----> 3 combined_model = tf.keras.Model(inputs=wide_model.input + [deep_model.input], outputs=merged_out)
          4 print(combined_model.summary())</p>
    
    <p>/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py
    in <strong>init</strong>(self, *args, **kwargs)
        111 
        112   def <strong>init</strong>(self, *args, **kwargs):
    --> 113     super(Model, self).<strong>init</strong>(*args, **kwargs)
        114     # Create a cache for iterator get_next op.
        115     self._iterator_get_next = weakref.WeakKeyDictionary()</p>
    
    <p>/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/network.py
    in <strong>init</strong>(self, *args, **kwargs)
         77         'inputs' in kwargs and 'outputs' in kwargs):
         78       # Graph network
    ---> 79       self._init_graph_network(*args, **kwargs)
         80     else:
         81       # Subclassed network</p>
    
    <p>/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/checkpointable/base.py
    in _method_wrapper(self, *args, **kwargs)
        362     self._setattr_tracking = False  # pylint: disable=protected-access
        363     try:
    --> 364       method(self, *args, **kwargs)
        365     finally:
        366       self._setattr_tracking = previous_value  # pylint: disable=protected-access</p>
    
    <p>/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/network.py
    in _init_graph_network(self, inputs, outputs, name)
        193                          'must come from <code>tf.layers.Input</code>. '
        194                          'Received: ' + str(x) +
    --> 195                          ' (missing previous layer metadata).')
        196       # Check that x is an input tensor.
        197       # pylint: disable=protected-access</p>
    
    <p>ValueError: Input tensors to a Model must come from <code>tf.layers.Input</code>.
    Received: Tensor("add_1:0", shape=(1, ?, 163), dtype=float32) (missing
    previous layer metadata).</p>
  </blockquote>
  
  <p>Here is the code for concatenating the two. </p>
  
  <pre><code>merged_out = tf.keras.layers.concatenate([wide_model.output, deep_model.output])
  merged_out = tf.keras.layers.Dense(1)(merged_out)
  combined_model = tf.keras.Model(inputs=wide_model.input + [deep_model.input], outputs=merged_out)
  print(combined_model.summary())
  </code></pre>
  
  <p>For each model's inputs, I tried using <code>tf.layers.Input</code>with</p>
  
  <pre><code>inputs = tf.placeholder(tf.float32, shape=(None,X_resampled.shape[1]))
  deep_inputs = tf.keras.Input(tensor=(inputs))
  </code></pre>
  
  <p>to make them <code>tf.layers.Input</code> as <a href="https://github.com/fchollet/deep-learning-models/issues/87" rel="nofollow noreferrer">this page</a> mentions. 
  But I'm still facing the same issue. </p>
  
  <p>I'm using tensorflow==1.10.0</p>
  
  <p>Could someone help me solving this issue? </p>
  
  <p>Thanks!</p>