I'm using a lstm and feed-forward network to classify text.
I convert the text into one-hot vectors and feed each into the lstm so I can summarise it as a single representation. Then I feed it to the other network.
But how do I train the lstm? I just want to sequence classify the text— should I feed it without training? I just want to represent the passage as a single item I can feed into the input layer of the classifier.
I would greatly appreciate any advice with this!
Update:
So I have an lstm and a classifier. I take all the outputs of the lstm and mean-pool them, then I feed that average into the classifier.
My issue is that I don't know how to train the lstm or the classifier. I know what the input should be for the lstm and what the output of the classifier should be for that input. Since they are two separate networks that are just being activated sequentially, I need to know and don't know what the ideal-output should be for the lstm, which would also be the input for the classifier. Is there a way to do this?