How to efficiently connect features to LSTM model?

▼魔方 西西 提交于 2020-04-07 08:30:49

问题


I have the following ‍LSTM model where I input my time-series to the LSTM layer. The other input (which is the dense layer) contains the 10 features I manually extracted from the time-series.

input1 = Input(shape=(26,6))
x1 = LSTM(100)(input1)
input2 = Input(shape=(10,1))
x2 = Dense(50)(input2)

x = concatenate([x1,x2])
x = Dense(200)(x)
output = Dense(1, activation='sigmoid')(x)

model = Model(inputs=[input1,input2], outputs=output)

I thought that the performance of my model will hugely increase with the features layer. However, it did not.

I was thinking the way I included the features to the model is primitive and needs more creativity with new layers (e.g., instead of Dense). I thought that it is great to get your feedback to have my features more efficiently into the LSTM model.

I am happy to provide more details if needed.

来源:https://stackoverflow.com/questions/60895974/how-to-efficiently-connect-features-to-lstm-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!