title: Keras TimeDistributed with multiple Inputs in different shapes
body: <p>I've got a pretrained model with multiple inputs which have different shapes. So I can call the model on new inputs that have a matching shape like this:</p>
  
  <pre><code>new_output = model([input_1, input2])
  </code></pre>
  
  <p>with </p>
  
  <pre><code>input_1.shape = (400, 200)
  input_2.shape = (400, 200, 10)
  </code></pre>
  
  <p>I want to reuse the model to train it on a data-series, so my new inputs would have the following shapes:</p>
  
  <pre><code>input_1.shape = (100, 400, 200)
  input_2.shape = (100, 400, 200, 10)
  </code></pre>
  
  <p>To reuse the model I want to use the <code>TimeDistributed</code> layer from Keras like this:</p>
  
  <pre><code>output = TimeDistributed(model)([input_1, input_2])
  </code></pre>
  
  <p>This doesn't work because <code>TimeDistributed</code> doesn't accept lists as input. All workarounds that I found so far are using merged inputs to solve this problem, but this solution doesn't work in my case because the input shapes are different. </p>
  
  <p>I also tried to use some <code>Lambda</code> layers like this:</p>
  
  <pre><code>lambda_0 = Lambda(lambda x: x)
  lambda_1 = Lambda(lambda x: [TimeDistributed(lambda_0)(x[0]), TimeDistributed(lambda_0)(x[1])])([input_1, input_2])
  output = model(lambda_1)
  </code></pre>
  
  <p>But this isn't working because it just uses the <code>TimeDistributed</code> on the <code>lambda_0</code> but not on the model. Maybe there is a solution with <code>Lambda</code> wrappers for this problem or maybe I have to define a custom Keras layer but at the moment I'm stuck with this problem so I would appreciate any help.</p>