# Multi dimensional LSTM modeling in KERAS

I have a database of time series signals with multiple features and Im trying to build a model to predict whether or not two samples are related to each other.

For example : a database of 1000 sample signals ( with 20 features ) from 10 person's voice and the model have to predict are there two samples related to same person or not

The model plan in my mind was : two same and parallel lstm networks for input 1 (sample 1) and input 2 (sample 2) and a binary output to predict the result.

I designed the model this way :

input_shape = (132,20) # 132 is sample length and 10 is num features

input_1= keras.Input(shape=input_shape, name='input_1')
input_2= keras.Input(shape=input_shape, name='input_2')

lstm_net = keras.layers.LSTM(256)
f1 = lstm_net(input_1)
f2 = lstm_net(input_2)

concatenate = keras.layers.Concatenate(axis=-1)
x = concatenate([f1, f2])

x = keras.layers.Dense(64, activation='relu')(x)

x = keras.layers.Dense(1, activation='sigmoid')(x)

model = keras.Model(inputs=[input_1, input_2], outputs=x)


I just want to know is this design correct for what i said ?

• Could you please directly put your specific question in the title?
– nbro
Mar 29 at 10:12