Defining a model based on LSTM