Nowadays, LSTM and CNN are combined to implement text classification. As to LSTM+CNN and CNN+LSTM, which model will get better performance? In this tutorial, we will disucss it.
The structure of CNN+LSTM
As to CNN+LSTM, the output of CNN will be fed into the LSTM or BiLSTM.
The structure of LSTM+CNN
Similar to CNN+LSTM, as to LSTM+CNN, the output of LSTM will be fed into a CNN network.
Which model will get better performance in text classification?
In paper:Twitter Sentiment Analysis using combined LSTM-CNN Models
As to experiment settings:
The result is:
We can find:
- LSTM is better than CNN and CNN-LSTM.
- LSTM-CNN gets the highest accuracy.