I have some training text data in variable lengths. I first feed that in an char-based Embedding, then padding using pack_padded_sequence, feeding in LSTM, and finally unpacking with pad_packed_sequence.
At this moment, I have a Variable of BATCH_SIZE*PAD_LENGTH*EMBEDDING_LEN and another Variable of the real length of each piece of data points. In this way, if I want the last output of each output for further steps and backprop (that said, I want to skip those with 0s as input due to padding), what is the best way to do so? Thanks!