title: How to combine two LSTM layers with different input sizes in Keras?
body: <p>I have two types of input sequences where <code>input1</code> contains 50 values and <code>input2</code> contains 25 values. I tried to combine these two sequence types using a LSTM model in functional API. However since the length of my two input sequences are different, I am wondering whether what I am currently doing is the right way. My code is as follows:</p>
  
  <pre><code>input1 = Input(shape=(50,1))
  x1 = LSTM(100)(input1)
  input2 = Input(shape=(25,1))
  x2 = LSTM(50)(input2)
  
  x = concatenate([x1,x2])
  x = Dense(200)(x)
  output = Dense(1, activation='sigmoid')(x)
  
  model = Model(inputs=[input1,input2], outputs=output)
  </code></pre>
  
  <p>More specifically I want to know how to combine two LSTM layers that have different input lengths (i.e. 50 and 25 in my case). I am happy to provide more details if needed.</p>