Imagine situation, input is some text file and information are spread according to rows. I want to use rows as input of model.
Model is planned as LSTM with softmax as output layer. My problem is the output; I want to classify text file to some categories. So I imagine this like, I open text file, do necessary preprocessing and row by row feed into the model and after I have applied all the rows to the file, I tell softmax which category is right for this document. But I don't know how to make softmax layer "wait" until last row of file is processed by LSTM layers.
For example, I have file with 1000 rows and every row has 5 features. So my dataset is [1000x5] size but I don't have 1000 y I have 1 y which told me category of this document. Documents can be different size so I can't use whole document as input. I also don't see as option make y size 1000 where everything is category index.
When I think about this seems to me, when person implement LSTM from scratch, is possible to make LSTM run(save every state) and after several iterations perform softmax and than apply BTT or more suitable algorithm and perform weights update.
Every LSTM keras tutorial which I saw uses y which is the same shape as number of samples. Maybe I didn't see right ones.