title: Two inputs of the same network error in TensorFlow
body: <p>I am trying to have a TensorFlow model that joins the representation and the classification parts separately. However, my classifier uses two inputs that come from the same representation network and the time I coded this architecture I received the error: &quot;The list of inputs passed to the model is redundant. All inputs should only appear once.&quot;. This is the code I have.</p>
  <pre><code>import tensorflow as tf
  
  def representation():
      inp = tf.keras.Input(shape=[100, 300])
      x = tf.keras.layers.Conv1D(300, 10, 1, 'same')(inp)
      output = tf.keras.layers.Conv1D(300, 10, 1, 'same')(x)
      return tf.keras.Model(inp, output)
  
  def classifier():
      inp1 = tf.keras.Input(shape=[100, 300])
      inp2 = tf.keras.Input(shape=[100, 300])
      output = tf.keras.layers.Activation('sigmoid')(inp1+inp2)
      return tf.keras.Model([inp1,inp2], output)
  
  repre = representation()
  cla = classifier()
  
  model = tf.keras.Model([repre.input, repre.input], cla([repre.output, repre.output]))
  </code></pre>
  <p>I used two representations like <code>tf.keras.Model([repre1.input, repre2.input], cla([repre1.output, repre2.output]))</code> and it works but, the representations come from different networks.</p>