I have a Keras' code of declaring LSTM. But I noticed Container class has already been removed in the latest version. https://keras.io/layers/containers/
How do I declare multiple inputs for LSTM in the latest format? I want to concatenate all inputs for the LSTM inputs.
Although I noticed a similar post, what I want to do is declaration of the model. How to work with multiple inputs for LSTM in Keras?
- keras 1.2.2
- Python 3.5.2 (Anaconda 4.1.1, 64bit)
```
g = Graph()
g.add_input(
name='i1',
input_shape=(None, i1_size)
)
g.add_input(
name='i2',
input_shape=(None, i2_size)
)
g.add_node(
LSTM(
n_hidden,
return_sequences=True,
activation='tanh'
),
name='h1',
inputs=[
'i1',
'i2'
]
)
```
Oh, May I just set input_shape as (i1_size+i2_size) like below?
model = Sequential()
model.add(LSTM(n_hidden, input_shape=(None, i1_size+i2_size), activation='tanh', return_sequences=True))