<p>In a document classification task, if you use LSTM the outputs are typically  word-level vectors, which can be either pre-trained or randomly initialized. You can combine word-level vectors with character-level vectors, e.g. <a href="https://arxiv.org/abs/1606.03475" rel="nofollow">https://arxiv.org/abs/1606.03475</a></p>
How to generate the "vectors" in input layer for text classification?
<p>I was thinking of using Keras to implement a document classification task, but the input of the LSTM layer is confusing me.</p>

<p>I know I have to generate the vectors for training, I have a corpus and one document per line in this corpus, if I would like to feed the corpus into the LSTM layer, do I need to first generate the document vectors from the corpus for training? Or instead of using word-level vectors, or character-level vectors?</p>