title: isinstance() to check Keras Layer Type on Tensor
body: <p>I get a list of pre-built Keras layers for a model as:</p>
  
  <pre><code>def build_model(layers):
  </code></pre>
  
  <p>And I want to build a Keras Functional API model a:</p>
  
  <pre><code>model = Model(inputs, outputs)
  </code></pre>
  
  <p>So for achieving this, I used:</p>
  
  <pre><code>inputs = list()
  outputs = list()
  for layer in layers:
      if isinstance(layer, keras.layers.Input):
          inputs.append(layer)
      else:
          outputs.append(layer)
  </code></pre>
  
  <p>But the problem is, the pre-built Keras Input Layer no-longer holds the datatype: Input, but is instead a Tensor like so:</p>
  
  <blockquote>
    <p>Tensor("input_1:0", shape=(None, None, None), dtype=float32)</p>
  </blockquote>
  
  <p>Is there a solution for this. The function signature cannot be changed unfortunately, but if there is a workaround - let me know (really stuck here).</p>
  
  <p>Thanks in advance.</p>